From 133b388a73e2e26c788e994f7fd085ebb307e5c6 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 18:24:49 -1000 Subject: Test the settings that fill the head and header --- tests/t0005-markup.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests') diff --git a/tests/t0005-markup.sh b/tests/t0005-markup.sh index f5034f0..d5b1610 100755 --- a/tests/t0005-markup.sh +++ b/tests/t0005-markup.sh @@ -228,6 +228,29 @@ test_expect_success 'the pages ask robots what the robots setting says' ' test_grep ! "" >head.html && + echo "" >header.html && + { + echo "root-desc=Hooks for themes" && + echo "favicon=/icon.png" && + echo "head-include=$PWD/head.html" && + echo "header=$PWD/header.html" && + cat hooksrc + } >headrc && + cgit_ok headrc "url=" >tmp && + sed -n "/^\$/,/^<\/head>\$/p" tmp >head && + test_grep "" head && + test_grep "" head && + test_grep "" head && + test_grep "

Hooks for themes

" tmp && + sed -n "/^\$/,/^
actual && + test_cmp header.html actual +' + # 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