projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffb7406
)
test/check-help: check that --help and -h are identical
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 5 Apr 2022 09:00:59 +0000
(11:00 +0200)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 5 Apr 2022 20:18:31 +0000
(22:18 +0200)
tools/check-help.sh
patch
|
blob
|
history
diff --git
a/tools/check-help.sh
b/tools/check-help.sh
index 19ec9414692b21d09710e6c2bc7e594044fcebbc..f97429364ecc58de9afe1367e65f4ed8ca374293 100755
(executable)
--- 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