diff --git a/test.sh b/test.sh index 6267322..3e7aeeb 100755 --- a/test.sh +++ b/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