X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT410-argument-parsing.sh;h=4a2b25c6486d5a3cc76dc9759b1520f1bcf034c4;hb=9165df21359cc5e93ddeb16bf9623a03441bed62;hp=4505c58301ead7531822d1d796174a98c699547a;hpb=bc99087ff95d0cdada827f3b838d05e0c9448b63;p=notmuch diff --git a/test/T410-argument-parsing.sh b/test/T410-argument-parsing.sh index 4505c583..4a2b25c6 100755 --- a/test/T410-argument-parsing.sh +++ b/test/T410-argument-parsing.sh @@ -15,4 +15,26 @@ positional arg 2 pos2 EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "sanity check zero values" +$TEST_DIRECTORY/arg-test --keyword=zero --boolean=false --int=0 > OUTPUT +cat < EXPECTED +boolean 0 +keyword 0 +int 0 +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest "space instead of = between parameter name and value" +# Note: spaces aren't allowed for booleans. false turns into a positional arg! +$TEST_DIRECTORY/arg-test --keyword one --boolean false --string foo --int 7 --flag one --flag three > OUTPUT +cat < EXPECTED +boolean 1 +keyword 1 +flags 5 +int 7 +string foo +positional arg 1 false +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done