# HG changeset patch # User Kim Alvefur # Date 1634043244 -7200 # Node ID 97c1399720c2f36749f60f72e06cce34c07dca57 # Parent d2a939e216713603572e7223995543e112a5ee95 util.argparse: Add test for #1691 diff -r d2a939e21671 -r 97c1399720c2 spec/util_argparse_spec.lua --- a/spec/util_argparse_spec.lua Tue Oct 12 14:48:21 2021 +0200 +++ b/spec/util_argparse_spec.lua Tue Oct 12 14:54:04 2021 +0200 @@ -43,4 +43,11 @@ 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);