From 03a10ef518cfb5641887b2715cad9d14f6366b42 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 18:10:37 -1000 Subject: Read any module-link path in the sample as one key The sample's example passed only because its path holds a slash, which the pattern for plain keys leaves out. A path without one was read as a key of its own and reported as undocumented, and a mimetype extension holding a character outside the pattern would have been dropped. --- tests/t0004-docs.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/t0004-docs.sh b/tests/t0004-docs.sh index 9fe4f87..4d94ad7 100755 --- a/tests/t0004-docs.sh +++ b/tests/t0004-docs.sh @@ -16,11 +16,10 @@ test_expect_success 'extract the key lists' ' sed -n "/^Global settings$/,/^Repository-specific cgitrc file$/p" "$ROOT/MANUAL.txt" | sed -n "s/^\([a-z][a-zA-Z0-9.<>-]*\)::$/\1/p" | sort >manual-keys && - sed -n "s/^#\{0,1\}\([a-z][a-zA-Z0-9.<>-]*\)=.*/\1/p" "$ROOT/custom/cgitrc" | - sed -e "s/^mimetype\..*/mimetype./" | + sed -n -e "s/^#\{0,1\}\(mimetype\)\..*=.*/\1./p" \ + -e "s/^#\{0,1\}\(repo\.module-link\)\..*=.*/\1./p" \ + -e "s/^#\{0,1\}\([a-z][a-zA-Z0-9.<>-]*\)=.*/\1/p" "$ROOT/custom/cgitrc" | sort -u >example-keys && - sed -n "s/^#\{0,1\}\(repo\.module-link\)\..*=.*/\1./p" "$ROOT/custom/cgitrc" >>example-keys && - sort -o example-keys example-keys && test -s manual-keys && test -s example-keys ' -- cgit 2.12.1