all repos — cgit @ v1.2.1

a hyperfast web frontend for git written in c

tests/t0106-diff.sh (view raw)

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