1 ----------------------------------------
2 -- This just verifies the number of args it got is what it expected.
3 -- The first arg should be a number, for how many total args to expect,
6 local testlib
= require("testlib")
9 testlib
.init({ [ARGS
]=3 })
11 -----------------------------
13 testlib
.testing("Command-line args")
15 local arg
={...} -- get passed-in args
17 testlib
.test(ARGS
, "arg1", arg
~= nil and #arg
> 0)
19 local numargs
= tonumber(arg
[1])
20 testlib
.test(ARGS
, "arg2", numargs
~= nil)
22 testlib
.test(ARGS
, "arg3", #arg
== numargs
)