added cli test

This commit is contained in:
mpeterv
2014-01-26 19:02:36 +04:00
parent 9ae8df55cc
commit 2a49500a01
4 changed files with 204 additions and 3 deletions

View File

@@ -201,7 +201,7 @@ describe("tests related to options", function()
it("doesn't accept GNU-like long options when it doesn't need arguments", function()
local parser = argparse.parser()
parser:flag("-q", "--quiet")
assert.has_error(function() parser:parse{"--quiet=very_quiet"} end, "option '--quiet' doesn't take arguments")
assert.has_error(function() parser:parse{"--quiet=very_quiet"} end, "option '--quiet' does not take arguments")
end)
it("handles too many invocations correctly", function()