mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
14 lines
400 B
Lua
14 lines
400 B
Lua
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)
|