aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_argparse_spec.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.argparse: Fix bug (regression?) in argument parsing with --foo=barMatthew Wild8 days1-0/+6
| | | | | | | | | | | | | | | | After recent changes, '--foo bar' was working, but '--foo=bar' was not. The test had a typo (?) (bar != baz) and because util.argparse is not strict by default, the typo was not caught. The typo caused the code to take a different path, and bypassed the buggy handling of --foo=bar options. I've preserved the existing test (typo and all!) because it's still an interesting test, and ensures no unintended behaviour changes compared to the old code. However I've added a new variant of the test, with strict mode enabled and the typo fixed. This test failed due to the bug, and this commit introduces a fix.
* util.argparse: Add strict mode + testsMatthew Wild2025-02-171-6/+46
|
* util.argparse: Add support for repeatable parametersKim Alvefur2022-01-051-0/+5
| | | | These are gathered into arrays
* util.argparse: Revise 553c6204fe5b with a different approachMatthew Wild2022-04-251-1/+1
| | | | | | The second return value is (not insensibly) assumed to be an error. Instead of returning a value there in the success case, copy the positional arguments into the existing opts table.
* util.argparse: Add test for #1691Kim Alvefur2021-10-121-0/+7
|
* util.argparse: TestsKim Alvefur2021-10-121-0/+46