Added another test

This commit is contained in:
mpeterv
2014-03-09 14:44:19 +04:00
parent 7bf5777413
commit b42960c0da

View File

@@ -18,6 +18,18 @@ describe("tests related to mutexes", function()
assert.same({}, args)
end)
it("handles mutex with default value", function()
local parser = Parser()
parser:mutex(
parser:flag "-q" "--quiet",
parser:option "-o" "--output"
:default "a.out"
)
local args = parser:parse{"-q"}
assert.same({quiet = true, output = "a.out"}, args)
end)
it("raises an error if mutex is broken", function()
local parser = Parser()
parser:mutex(