From fbd61f329f9f29a86b34d0df166d5174acadd1fd Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 12:55:58 -1000 Subject: Test the tag page for a name that is no tag --- tests/t0113-tag.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/t0113-tag.sh b/tests/t0113-tag.sh index 2a95a36..0fec8b6 100755 --- a/tests/t0113-tag.sh +++ b/tests/t0113-tag.sh @@ -48,6 +48,12 @@ test_expect_success 'a lightweight tag gets the shorter table' ' test_grep ! "tagged by" tmp ' +test_expect_success 'a name that is no tag is a 404' ' + cgit_url "foo/tag/&id=no-such-tag" >tmp && + test_grep "^Status: 404" tmp && + test_grep "
Bad tag reference: no-such-tag
" tmp +' + # A snapshot is cut from a commit, so a tag of a tree or a blob offers none. test_expect_success 'a tag of anything but a commit offers no download' ' git -C repos/foo tag -a -m "a tree" tree-tag HEAD^{tree} && -- cgit 2.12.1