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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user