Improved command line parsing

The first character after control character is now not required to be a letter
This commit is contained in:
mpeterv
2014-02-23 16:15:49 +04:00
parent ad4959b137
commit fc65c85a13
3 changed files with 31 additions and 23 deletions

View File

@@ -23,12 +23,12 @@ describe("tests related to help message generation", function()
it("uses custom help option", function()
local parser = Parser "foo"
:add_help {aliases = {"\\?"}}
:add_help {name = "/?"}
assert.equal(table.concat({
"Usage: foo [\\?]",
"Usage: foo [/?]",
"",
"Options: ",
" \\? Show this help message and exit. "
" /? Show this help message and exit. "
}, "\r\n"), parser:prepare():get_help())
end)