From: Zbigniew Jędrzejewski-Szmek Date: Tue, 5 Apr 2022 09:00:59 +0000 (+0200) Subject: test/check-help: check that --help and -h are identical X-Git-Tag: v251-rc2~190^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f9be6ea28f09305f7ee796708f0fe8a871e7220;p=thirdparty%2Fsystemd.git test/check-help: check that --help and -h are identical --- diff --git a/tools/check-help.sh b/tools/check-help.sh index 19ec9414692..f97429364ec 100755 --- a/tools/check-help.sh +++ b/tools/check-help.sh @@ -39,3 +39,9 @@ if ! ("$BINARY" --no-such-parameter 2>&1 1>/dev/null || :) | grep . >/dev/null; echo "$(basename "$BINARY") with an unknown parameter does not print to stderr" exit 4 fi + +# --help and -h are equivalent +if ! diff <("$BINARY" -h) <("$BINARY" --help); then + echo "$(basename "$BINARY") --help and -h are not identical" + exit 5 +fi