FIX #1914 Reject command lines with trailing flags

Signed-off-by: David Gageot <david@gageot.net>
This commit is contained in:
David Gageot
2015-10-09 15:40:15 +02:00
parent 6a5219b879
commit cd80b70d26
2 changed files with 7 additions and 8 deletions

View File

@@ -52,10 +52,10 @@ load ${BASE_TEST_DIR}/helpers.bash
[[ ${lines[0]} == "Error creating machine: Machine A already exists" ]]
}
@test "none: extraneous argument is ignored in name 'machine create -d none --url none a foo'" {
run machine create -d none a foo
@test "none: fail with extra argument 'machine create -d none --url none a extra'" {
run machine create -d none --url none a extra
[ "$status" -eq 1 ]
[[ ${lines[0]} == "Host already exists: \"a\"" ]]
[[ ${lines[0]} == "Invalid command line. Found extra arguments [extra]" ]]
}
@test "none: create with weird but valid name succeeds 'machine create -d none --url none 0'" {