Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Lead a blame page's folder crumbs to the tree
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0104-tree.sh | 16 |
1 file changed, 16 insertions, 0 deletions
diff --git a/tests/t0104-tree.sh b/tests/t0104-tree.sh index 26a0cb4..754b3e1 100755 --- a/tests/t0104-tree.sh +++ b/tests/t0104-tree.sh @@ -79,6 +79,22 @@ test_expect_success 'the blame stripes are as wide as the escaped line' ' grep "^ \\{31\\}</pre></div>" tmp ' +# Blame takes a file alone, so on its page the crumbs for the folders above +# the file lead to the tree. +test_expect_success 'the folder crumbs of a blame page lead to the tree' ' + mkrepo repos/nested 1 && + ( + cd repos/nested && + mkdir -p a/b && + echo x >a/b/file.txt && + git add a && + git commit -m nested + ) && + cgitrc_repo nestedrc nested enable-blame=1 && + cgit_rc nestedrc "url=nested/blame/a/b/file.txt" >tmp && + grep "path: <a href=./nested/tree/.>root</a>/<a href=./nested/tree/a.>a</a>/<a href=./nested/tree/a/b.>b</a>/<a href=./nested/blame/a/b/file.txt.>file.txt</a>" tmp +' + test_expect_success 'generate foo+bar/tree' 'cgit_url "foo%2bbar/tree" >tmp' test_expect_success 'verify a+b link' ' |
