diff options
author | Kim Alvefur <zash@zash.se> | 2021-10-12 14:54:04 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-10-12 14:54:04 +0200 |
commit | 21784ddc118fb82a162f08162167ff9b609b7250 (patch) | |
tree | b6edd38996ae3b92ca8870bb5afbc184d51c0462 /spec | |
parent | 0c99443297976ed3ff83ec07c0301da830d6eb24 (diff) | |
download | prosody-21784ddc118fb82a162f08162167ff9b609b7250.tar.gz prosody-21784ddc118fb82a162f08162167ff9b609b7250.zip |
util.argparse: Add test for #1691
Diffstat (limited to 'spec')
-rw-r--r-- | spec/util_argparse_spec.lua | 7 |
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); |