Software /
code /
prosody
Comparison
spec/util_argparse_spec.lua @ 11845:97c1399720c2
util.argparse: Add test for #1691
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 12 Oct 2021 14:54:04 +0200 |
parent | 11843:d2a939e21671 |
child | 12477:cc84682b8429 |
comparison
equal
deleted
inserted
replaced
11843:d2a939e21671 | 11845:97c1399720c2 |
---|---|
41 assert.falsy(opts); | 41 assert.falsy(opts); |
42 assert.equal("missing-value", err); | 42 assert.equal("missing-value", err); |
43 assert.equal("--foo", where); | 43 assert.equal("--foo", where); |
44 end); | 44 end); |
45 | 45 |
46 it("reports where the problem is", function() | |
47 local opts, err, where = parse({ "-h" }); | |
48 assert.falsy(opts); | |
49 assert.equal("param-not-found", err); | |
50 assert.equal("-h", where, "returned where"); | |
51 end); | |
52 | |
46 end); | 53 end); |