t9500: Add basic sanity tests for side-by-side diff in gitweb

Test that side-by-side diff can deal with incomplete lines (and while
at it with pure addition, pure removal, and change), and with merge
commits, producing no errors or warnings.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jakub Narebski 2011-10-31 00:36:25 +01:00 коммит произвёл Junio C Hamano
Родитель e4bd10b2cd
Коммит 1e706eccd4
1 изменённых файлов: 25 добавлений и 1 удалений

Просмотреть файл

@ -329,7 +329,8 @@ test_expect_success \
git add b &&
git commit -a -m "On branch" &&
git checkout master &&
git pull . b'
git pull . b &&
git tag merge_commit'
test_expect_success \
'commit(0): merge commit' \
@ -378,6 +379,29 @@ test_expect_success \
'commitdiff(1): large commit' \
'gitweb_run "p=.git;a=commitdiff;h=b"'
# ----------------------------------------------------------------------
# side-by-side diff
test_expect_success 'side-by-side: addition of incomplete line' '
gitweb_run "p=.git;a=commitdiff;h=incomplete_lines_add;ds=sidebyside"
'
test_expect_success 'side-by-side: incomplete line as context line' '
gitweb_run "p=.git;a=commitdiff;h=incomplete_lines_ctx;ds=sidebyside"
'
test_expect_success 'side-by-side: changed incomplete line' '
gitweb_run "p=.git;a=commitdiff;h=incomplete_lines_chg;ds=sidebyside"
'
test_expect_success 'side-by-side: removal of incomplete line' '
gitweb_run "p=.git;a=commitdiff;h=incomplete_lines_rem;ds=sidebyside"
'
test_expect_success 'side-by-side: merge commit' '
gitweb_run "p=.git;a=commitdiff;h=merge_commit;ds=sidebyside"
'
# ----------------------------------------------------------------------
# tags testing