test/system: Test the handling of unknown flags
https://github.com/containers/toolbox/pull/802
This commit is contained in:
parent
f2efc0f758
commit
9fdf10f2e1
1 changed files with 8 additions and 0 deletions
|
@ -33,3 +33,11 @@ load 'libs/helpers.bash'
|
||||||
assert_line --index 0 "Error: unknown command \"foo\" for \"toolbox\""
|
assert_line --index 0 "Error: unknown command \"foo\" for \"toolbox\""
|
||||||
assert_line --index 1 "Run 'toolbox --help' for usage."
|
assert_line --index 1 "Run 'toolbox --help' for usage."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "help: Try to run toolbox with non-existent flag (shows usage screen)" {
|
||||||
|
run $TOOLBOX --foo
|
||||||
|
|
||||||
|
assert_failure
|
||||||
|
assert_line --index 0 "Error: unknown flag: --foo"
|
||||||
|
assert_line --index 1 "Run 'toolbox --help' for usage."
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue