diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:39 +0000 |
commit | 7260c37aa8c91c8008dcd2442a19c23d1c9040fb (patch) | |
tree | 83953428f11212a71a4616e535c1053076f9bb94 /t/t0040-parse-options.sh | |
parent | Releasing progress-linux version 1:2.43.0-1~progress7.99u1. (diff) | |
download | git-7260c37aa8c91c8008dcd2442a19c23d1c9040fb.tar.xz git-7260c37aa8c91c8008dcd2442a19c23d1c9040fb.zip |
Merging upstream version 1:2.45.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/t0040-parse-options.sh')
-rwxr-xr-x | t/t0040-parse-options.sh | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index 8fdef88..8bb2a8b 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -210,6 +210,22 @@ test_expect_success 'superfluous value provided: boolean' ' test_cmp expect actual ' +test_expect_success 'superfluous value provided: boolean, abbreviated' ' + cat >expect <<-\EOF && + error: option `yes'\'' takes no value + EOF + test_expect_code 129 env GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \ + test-tool parse-options --ye=hi 2>actual && + test_cmp expect actual && + + cat >expect <<-\EOF && + error: option `no-yes'\'' takes no value + EOF + test_expect_code 129 env GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \ + test-tool parse-options --no-ye=hi 2>actual && + test_cmp expect actual +' + test_expect_success 'superfluous value provided: cmdmode' ' cat >expect <<-\EOF && error: option `mode1'\'' takes no value @@ -376,7 +392,7 @@ test_expect_success 'OPT_CMDMODE() detects incompatibility (1)' ' test_must_be_empty output && test_grep "mode1" output.err && test_grep "mode2" output.err && - test_grep "is incompatible with" output.err + test_grep "cannot be used together" output.err ' test_expect_success 'OPT_CMDMODE() detects incompatibility (2)' ' @@ -384,7 +400,7 @@ test_expect_success 'OPT_CMDMODE() detects incompatibility (2)' ' test_must_be_empty output && test_grep "mode2" output.err && test_grep "set23" output.err && - test_grep "is incompatible with" output.err + test_grep "cannot be used together" output.err ' test_expect_success 'OPT_CMDMODE() detects incompatibility (3)' ' @@ -392,7 +408,7 @@ test_expect_success 'OPT_CMDMODE() detects incompatibility (3)' ' test_must_be_empty output && test_grep "mode2" output.err && test_grep "set23" output.err && - test_grep "is incompatible with" output.err + test_grep "cannot be used together" output.err ' test_expect_success 'OPT_CMDMODE() detects incompatibility (4)' ' @@ -401,7 +417,7 @@ test_expect_success 'OPT_CMDMODE() detects incompatibility (4)' ' test_must_be_empty output && test_grep "mode2" output.err && test_grep "mode34.3" output.err && - test_grep "is incompatible with" output.err + test_grep "cannot be used together" output.err ' test_expect_success 'OPT_COUNTUP() with PARSE_OPT_NODASH works' ' |