summaryrefslogtreecommitdiff
path: root/test/system/300-cli-parsing.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-02-21 15:11:37 -0500
committerGitHub <noreply@github.com>2022-02-21 15:11:37 -0500
commitc9359e1494ef78ede53086cdf762da7f197bb421 (patch)
treea6e81c28b6fa9750a78dcef7e7de6a1c26f3127a /test/system/300-cli-parsing.bats
parent4ad98b9fd3519ef901430c35d74b1dc7e65f9d84 (diff)
parent44d037898ebc328432823d51ca2da298902a46e9 (diff)
downloadpodman-c9359e1494ef78ede53086cdf762da7f197bb421.tar.gz
podman-c9359e1494ef78ede53086cdf762da7f197bb421.tar.bz2
podman-c9359e1494ef78ede53086cdf762da7f197bb421.zip
Merge pull request #13306 from Luap99/flag-error
provide better error on invalid flag
Diffstat (limited to 'test/system/300-cli-parsing.bats')
-rw-r--r--test/system/300-cli-parsing.bats14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/system/300-cli-parsing.bats b/test/system/300-cli-parsing.bats
index 92c073102..ec493d3d8 100644
--- a/test/system/300-cli-parsing.bats
+++ b/test/system/300-cli-parsing.bats
@@ -12,4 +12,18 @@ load helpers
run_podman run --rm --label 'true="false"' $IMAGE true
}
+@test "podman flag error" {
+ local name="podman"
+ if is_remote; then
+ name="podman-remote"
+ fi
+ run_podman 125 run -h
+ is "$output" "Error: flag needs an argument: 'h' in -h
+See '$name run --help'" "expected error output"
+
+ run_podman 125 bad --invalid
+ is "$output" "Error: unknown flag: --invalid
+See '$name --help'" "expected error output"
+}
+
# vim: filetype=sh