aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/util_argparse_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/util_argparse_spec.lua b/spec/util_argparse_spec.lua
index 6b024249..3994a041 100644
--- a/spec/util_argparse_spec.lua
+++ b/spec/util_argparse_spec.lua
@@ -43,4 +43,11 @@ describe("parse", function()
assert.equal("--foo", where);
end);
+ it("reports where the problem is", function()
+ local opts, err, where = parse({ "-h" });
+ assert.falsy(opts);
+ assert.equal("param-not-found", err);
+ assert.equal("-h", where, "returned where");
+ end);
+
end);