Skip to content

Commit 1e706ec

Browse files
jnarebgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e4bd10b commit 1e706ec

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

t/t9500-gitweb-standalone-no-errors.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ test_expect_success \
329329
git add b &&
330330
git commit -a -m "On branch" &&
331331
git checkout master &&
332-
git pull . b'
332+
git pull . b &&
333+
git tag merge_commit'
333334

334335
test_expect_success \
335336
'commit(0): merge commit' \
@@ -378,6 +379,29 @@ test_expect_success \
378379
'commitdiff(1): large commit' \
379380
'gitweb_run "p=.git;a=commitdiff;h=b"'
380381

382+
# ----------------------------------------------------------------------
383+
# side-by-side diff
384+
385+
test_expect_success 'side-by-side: addition of incomplete line' '
386+
gitweb_run "p=.git;a=commitdiff;h=incomplete_lines_add;ds=sidebyside"
387+
'
388+
389+
test_expect_success 'side-by-side: incomplete line as context line' '
390+
gitweb_run "p=.git;a=commitdiff;h=incomplete_lines_ctx;ds=sidebyside"
391+
'
392+
393+
test_expect_success 'side-by-side: changed incomplete line' '
394+
gitweb_run "p=.git;a=commitdiff;h=incomplete_lines_chg;ds=sidebyside"
395+
'
396+
397+
test_expect_success 'side-by-side: removal of incomplete line' '
398+
gitweb_run "p=.git;a=commitdiff;h=incomplete_lines_rem;ds=sidebyside"
399+
'
400+
401+
test_expect_success 'side-by-side: merge commit' '
402+
gitweb_run "p=.git;a=commitdiff;h=merge_commit;ds=sidebyside"
403+
'
404+
381405
# ----------------------------------------------------------------------
382406
# tags testing
383407

0 commit comments

Comments
 (0)