mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
fixed arguments from root parser not formatted
This commit is contained in:
13
spec/commands_spec.lua
Normal file
13
spec/commands_spec.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
local argparse = require "argparse"
|
||||
|
||||
describe("tests related to commands", function()
|
||||
it("handles commands after arguments", function()
|
||||
local parser = argparse.parser "name"
|
||||
parser:argument "file"
|
||||
parser:command "create"
|
||||
parser:command "remove"
|
||||
|
||||
local args = parser:parse{"temp.txt", "remove"}
|
||||
assert.same({file = "temp.txt", remove = true}, args)
|
||||
end)
|
||||
end)
|
Reference in New Issue
Block a user