]> git.cameronkatri.com Git - cgit.git/blob - tests/t0106-diff.sh
git: update to v2.32.0
[cgit.git] / tests / t0106-diff.sh
1 #!/bin/sh
2
3 test_description='Check content on diff page'
4 . ./setup.sh
5
6 test_expect_success 'generate foo/diff' 'cgit_url "foo/diff" >tmp'
7 test_expect_success 'find diff header' 'grep "a/file-5 b/file-5" tmp'
8 test_expect_success 'find blob link' 'grep "<a href=./foo/tree/file-5?id=" tmp'
9 test_expect_success 'find added file' 'grep "new file mode 100644" tmp'
10
11 test_expect_success 'find hunk header' '
12 grep "<div class=.hunk.>@@ -0,0 +1 @@</div>" tmp
13 '
14
15 test_expect_success 'find added line' '
16 grep "<div class=.add.>+5</div>" tmp
17 '
18
19 test_done