diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2022-08-19 19:03:57 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-19 21:13:14 +0300 |
commit | 99d86d60e59e11cbc46766346e3e379164a6e4df (patch) | |
tree | 01d48b5ff8a6815654379ac8f3ddf939e6b8b9f9 /t/t0040-parse-options.sh | |
parent | 80882bc5e7143a0c3823b5a398fd76c9138437ef (diff) |
parse-options: PARSE_OPT_KEEP_UNKNOWN only applies to --options
The description of 'PARSE_OPT_KEEP_UNKNOWN' starts with "Keep unknown
arguments instead of erroring out". This is a bit misleading, as this
flag only applies to unknown --options, while non-option arguments are
kept even without this flag.
Update the description to clarify this, and rename the flag to
PARSE_OPTIONS_KEEP_UNKNOWN_OPT to make this obvious just by looking at
the flag name.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0040-parse-options.sh')
-rwxr-xr-x | t/t0040-parse-options.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index 8511ce24bb..264b737309 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -488,8 +488,8 @@ test_expect_success 'STOP_AT_NON_OPTION works' ' test_cmp expect actual ' -test_expect_success 'KEEP_UNKNOWN works' ' - test-tool parse-options-flags --keep-unknown cmd --unknown=1 --opt=6 -u2 >actual && +test_expect_success 'KEEP_UNKNOWN_OPT works' ' + test-tool parse-options-flags --keep-unknown-opt cmd --unknown=1 --opt=6 -u2 >actual && cat >expect <<-\EOF && opt: 6 arg 00: --unknown=1 @@ -515,8 +515,8 @@ do " done -test_expect_success 'KEEP_UNKNOWN | NO_INTERNAL_HELP works' ' - test-tool parse-options-flags --keep-unknown --no-internal-help cmd -h --help --help-all >actual && +test_expect_success 'KEEP_UNKNOWN_OPT | NO_INTERNAL_HELP works' ' + test-tool parse-options-flags --keep-unknown-opt --no-internal-help cmd -h --help --help-all >actual && cat >expect <<-\EOF && opt: 0 arg 00: -h |