:pparse() should still raise an error if it is caused by misconfiguration

This commit is contained in:
mpeterv
2014-02-18 15:35:58 +04:00
parent a0fe631b08
commit 3a80e0179b
2 changed files with 8 additions and 0 deletions

View File

@@ -16,4 +16,11 @@ describe("tests related to :pparse()", function()
assert.is_false(ok)
assert.equal("too few arguments", errmsg)
end)
it("still raises an error if it is caused by misconfiguration", function()
local parser = Parser()
parser:option "--foo"
:count "a lot"
assert.has_error(function() parser:pparse{} end)
end)
end)