From 8ede27f75eea9595768eef09ba744f12650e1412 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 1 Nov 2026 15:42:57 -1000 Subject: Lead an error page's title with the error The config error page had a title of its own, in the reverse order, and now takes the same one as any other 404, since its message already says the repository failed to open. --- tests/t0005-markup.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/t0005-markup.sh b/tests/t0005-markup.sh index a6dd028..3260e49 100755 --- a/tests/t0005-markup.sh +++ b/tests/t0005-markup.sh @@ -118,6 +118,19 @@ test_expect_success 'each page names itself, then the repository and the site' ' grep "blame - hello.c < dir - hooks - $site" tmp ' +test_expect_success 'an error page names the error where a page names itself' ' + site="Git repository browser" && + cgit_rc hooksrc "url=hooks/tree/missing" >tmp && + grep "^Status: 404" tmp && + grep "Not Found - hooks - $site" tmp && + cgit_rc hooksrc "url=hooks/nonsense/" >tmp && + grep "Not Found - hooks - $site" tmp && + cgitrc_repo brokenrc broken "repo.path=$PWD/nowhere" && + cgit_rc brokenrc "url=broken/" >tmp && + grep "Failed to open broken" tmp && + grep "Not Found - $site" tmp +' + # A browser gives these elements a monospace font of its own, which would # otherwise win over the one a theme sets through --font-mono. test_expect_success 'every monospace element takes the theme font' ' -- cgit 2.12.1