mirror of
https://github.com/walles/moar.git
synced 2024-08-16 23:40:35 +03:00
Accept not having --version in the OPTIONS section
It's documented separately at the top of the man page.
This commit is contained in:
parent
8ca95ce6d2
commit
5571c181b7
4
test.sh
4
test.sh
@ -52,9 +52,9 @@ echo Test --version...
|
||||
./moar --version >/dev/null # Should exit with code 0
|
||||
diff -u <(./moar --version) <(git describe --tags --dirty --always)
|
||||
|
||||
echo Verify man page and --help document the same set of options...
|
||||
echo Test that the man page and --help document the same set of options...
|
||||
MAN_OPTIONS="$(grep -E '^\\fB' moar.1 | cut -d\\ -f4- | sed 's/fR.*//' | sed 's/\\//g')"
|
||||
MOAR_OPTIONS="$(./moar --help | grep -E '^ -' | cut -d' ' -f3)"
|
||||
MOAR_OPTIONS="$(./moar --help | grep -E '^ -' | cut -d' ' -f3 | grep -v -- -version)"
|
||||
diff -u <(echo "$MAN_OPTIONS") <(echo "$MOAR_OPTIONS")
|
||||
|
||||
# FIXME: On unknown command line options, test that help text goes to stderr
|
||||
|
Loading…
Reference in New Issue
Block a user