mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
Argname can be an array
This commit is contained in:
@@ -143,5 +143,19 @@ describe("tests related to usage message generation", function()
|
||||
parser:get_usage()
|
||||
)
|
||||
end)
|
||||
|
||||
it("uses array of argnames provided by user", function()
|
||||
local parser = Parser "foo"
|
||||
:add_help(false)
|
||||
parser:option "--pair"
|
||||
:args(2)
|
||||
:count "*"
|
||||
:argname{"<key>", "<value>"}
|
||||
|
||||
assert.equal(
|
||||
[=[Usage: foo [--pair <key> <value>]]=],
|
||||
parser:get_usage()
|
||||
)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user