test: also exercise the "help" verb of introspectable commands

Verb-based commands register the help verb with
VERB_COMMON_HELP_AUTO("name"), where the name is spelled separately from
the one used for --help, so let's check that it works too.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-08-17 16:11:09 +02:00
parent 10468a0164
commit f2194e053f
@@ -96,6 +96,11 @@ for i in "${INTROSPECTABLE[@]}"; do
$i --introspect-cli | jq -e \
'any(.commands[]; [.options[].names[-1]] | contains(["--help", "--version", "--introspect-cli"]))'
$i --intro | grep -e --help
# If the tool has a "help" verb, it must work too
if $i --introspect-cli | jq -e 'any(.commands[]; (.verbs // []) | any(.names[0] == "help"))' >/dev/null; then
$i help >/dev/null
fi
done
# systemd-hwdb defines verbs, check that they are described