From ba066ae56395d481d669d69c4ad14d9a268c0762 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 1 Nov 2026 10:18:08 -1000 Subject: Lead a blame page's folder crumbs to the tree --- tests/t0104-tree.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests') 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\\}" 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: root/a/b/file.txt" tmp +' + test_expect_success 'generate foo+bar/tree' 'cgit_url "foo%2bbar/tree" >tmp' test_expect_success 'verify a+b link' ' -- cgit 2.12.1