tvl-depot/third_party/cgit/tests/t0106-diff.sh
sterni 40803d9c6d subtree(3p/cgit): merge cgit-pink into depot cgit
cgit-pink is a maintained fork of cgit that follows upstream git more
closely and already contains a lot of patches we already had applied.
Consequently, it seems sensible it becomes our future upstream, we may
even be able to upstream some of our custom, less invasive patches.

Change-Id: Ia081e4508866f32298986c7160f4890c8a7c8922
2022-05-19 10:45:02 +02:00

19 lines
550 B
Bash
Executable file

#!/bin/sh
test_description='Check content on diff page'
. ./setup.sh
test_expect_success 'generate foo/diff' 'cgit_url "foo/diff" >tmp'
test_expect_success 'find diff header' 'grep "a/file-5 b/file-5" tmp'
test_expect_success 'find blob link' 'grep "<a href=./foo/tree/file-5?id=" tmp'
test_expect_success 'find added file' 'grep "new file mode 100644" tmp'
test_expect_success 'find hunk header' '
grep "<span class=.hunk.>@@ -0,0 +1 @@</span>" tmp
'
test_expect_success 'find added line' '
grep "<span class=.add.>+5</span>" tmp
'
test_done