summaryrefslogtreecommitdiff
path: root/test/system/015-help.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/015-help.bats')
-rw-r--r--test/system/015-help.bats13
1 files changed, 5 insertions, 8 deletions
diff --git a/test/system/015-help.bats b/test/system/015-help.bats
index 51660ba12..b2c6e2575 100644
--- a/test/system/015-help.bats
+++ b/test/system/015-help.bats
@@ -143,16 +143,13 @@ function check_help() {
count=$(expr $count + 1)
done
- # Any command that takes subcommands, prints its help if called
+ # Any command that takes subcommands, prints its help and errors if called
# without one.
dprint "podman $@"
-
- # Store the output of the actual --help command
- run_podman "$@" --help
- local full_help="$output"
-
- run_podman "$@"
- is "$output" "$full_help" "'podman $*' without any subcommand - expected help message"
+ run_podman '?' "$@"
+ is "$status" 125 "'podman $*' without any subcommand - exit status"
+ is "$output" ".*Usage:.*Error: missing command '.*$@ COMMAND'" \
+ "'podman $*' without any subcommand - expected error message"
# Assume that 'NoSuchCommand' is not a command
dprint "podman $@ NoSuchCommand"