X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft0040-parse-options.sh;h=20924506af886c8d0ce28f3fcb2742214d80020f;hb=7e7db5e4520388d3a6f1efbe2f7a29d43bd06a2b;hp=bbc821ef97de76ef532ec1d1d704da15e8973500;hpb=00d3278c8534a8244ae3447189401111e017fd5d;p=git.git diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index bbc821ef9..20924506a 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -7,7 +7,7 @@ test_description='our own option parser' . ./test-lib.sh -cat > expect.err << EOF +cat > expect << EOF usage: test-parse-options -b, --boolean get a boolean @@ -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[=] use digits to display SHA-1s @@ -44,10 +46,12 @@ EOF test_expect_success 'test help' ' test_must_fail test-parse-options -h > output 2> output.err && - test ! -s output && - test_cmp expect.err output.err + test ! -s output.err && + test_cmp expect output ' +mv expect expect.err + cat > expect << EOF boolean: 2 integer: 1729 @@ -315,4 +319,22 @@ test_expect_success 'OPT_NUMBER_CALLBACK() works' ' test_cmp expect output ' +cat >expect <output 2>output.err && + test ! -s output.err && + test_cmp expect output +' + test_done