diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t0040-parse-options.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index bbc821ef97..3d450ed379 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -33,6 +33,8 @@ Magic arguments --quux means --quux -NUM set integer to NUM + same as -b + --ambiguous positive ambiguity + --no-ambiguous negative ambiguity Standard options --abbrev[=<n>] use <n> digits to display SHA-1s @@ -315,4 +317,22 @@ test_expect_success 'OPT_NUMBER_CALLBACK() works' ' test_cmp expect output ' +cat >expect <<EOF +boolean: 0 +integer: 0 +timestamp: 0 +string: (not set) +abbrev: 7 +verbose: 0 +quiet: no +dry run: no +file: (not set) +EOF + +test_expect_success 'negation of OPT_NONEG flags is not ambiguous' ' + test-parse-options --no-ambig >output 2>output.err && + test ! -s output.err && + test_cmp expect output +' + test_done |