Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
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.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0004-docs.sh | 7 |
1 file changed, 3 insertions, 4 deletions
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.<ext>/" | + sed -n -e "s/^#\{0,1\}\(mimetype\)\..*=.*/\1.<ext>/p" \ + -e "s/^#\{0,1\}\(repo\.module-link\)\..*=.*/\1.<path>/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.<path>/p" "$ROOT/custom/cgitrc" >>example-keys && - sort -o example-keys example-keys && test -s manual-keys && test -s example-keys ' |
