Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Prove the rows the blame link check looks past
The checks that blob.bin, big.bin and large.txt get no blame link
never showed those rows were in the listing, so a listing that dropped
them passed.
| -rwxr-xr-x | tests/t0104-tree.sh | 16 |
1 file changed, 10 insertions, 6 deletions
diff --git a/tests/t0104-tree.sh b/tests/t0104-tree.sh index 2a7c741..ea1f15e 100755 --- a/tests/t0104-tree.sh +++ b/tests/t0104-tree.sh @@ -315,7 +315,8 @@ test_expect_success 'a large binary is dumped only in part' ' ' # The blame page refuses a file git counts as binary and one past -# max-blob-size, so a listing offers blame for neither. +# max-blob-size, so a listing offers blame for neither. The two binaries are +# the ones the tests above committed. test_expect_success 'a listing offers blame only where it works' ' ( cd repos/bin && @@ -325,11 +326,14 @@ test_expect_success 'a listing offers blame only where it works' ' git commit -m "text files" ) && cgitrc_repo binblamerc bin enable-blame=1 max-blob-size=4 && - cgit_rc binblamerc "url=bin/tree/" >tmp && - grep "href=./bin/blame/small.txt.>blame</a>" tmp && - ! grep "href=./bin/blame/large.txt.>blame</a>" tmp && - ! grep "href=./bin/blame/blob.bin.>blame</a>" tmp && - ! grep "href=./bin/blame/big.bin.>blame</a>" tmp + cgit_ok binblamerc "url=bin/tree/" >tmp && + test_grep "href=./bin/tree/large.txt.>large.txt</a>" tmp && + test_grep "href=./bin/tree/blob.bin.>blob.bin</a>" tmp && + test_grep "href=./bin/tree/big.bin.>big.bin</a>" tmp && + test_grep "href=./bin/blame/small.txt.>blame</a>" tmp && + test_grep ! "href=./bin/blame/large.txt.>blame</a>" tmp && + test_grep ! "href=./bin/blame/blob.bin.>blame</a>" tmp && + test_grep ! "href=./bin/blame/big.bin.>blame</a>" tmp ' # The listing sniffs only the window git judges binary by, while blame and |
