summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-04-05 11:00:59 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-04-05 22:18:31 +0200
commit9f9be6ea28f09305f7ee796708f0fe8a871e7220 (patch)
treed3101a71e085b91f04129b6fcf4972d8c1c9023c /tools
parenttests: add a smoke test for --version option in binaries (diff)
downloadsystemd-9f9be6ea28f09305f7ee796708f0fe8a871e7220.tar.xz
systemd-9f9be6ea28f09305f7ee796708f0fe8a871e7220.zip
test/check-help: check that --help and -h are identical
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-help.sh6
1 files changed, 6 insertions, 0 deletions
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