]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test/check-help: check that --help and -h are identical
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 5 Apr 2022 09:00:59 +0000 (11:00 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 5 Apr 2022 20:18:31 +0000 (22:18 +0200)
tools/check-help.sh

index 19ec9414692b21d09710e6c2bc7e594044fcebbc..f97429364ecc58de9afe1367e65f4ed8ca374293 100755 (executable)
@@ -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