From 9f9be6ea28f09305f7ee796708f0fe8a871e7220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 5 Apr 2022 11:00:59 +0200 Subject: test/check-help: check that --help and -h are identical --- tools/check-help.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/check-help.sh b/tools/check-help.sh index 19ec941469..f97429364e 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 -- cgit v1.2.1