mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
Added help message generation; Improved optional arguments handling.
This commit is contained in:
@@ -185,6 +185,7 @@ describe("tests related to options", function()
|
||||
|
||||
it("handles unknown options correctly", function()
|
||||
local parser = argparse.parser()
|
||||
:add_help(false)
|
||||
assert.has_error(function() parser:parse{"--server"} end, "unknown option '--server'")
|
||||
assert.has_error(function() parser:parse{"--server=localhost"} end, "unknown option '--server'")
|
||||
assert.has_error(function() parser:parse{"-s"} end, "unknown option '-s'")
|
||||
|
Reference in New Issue
Block a user