diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t0040-parse-options.sh | 8 | ||||
-rwxr-xr-x | t/t1502-rev-parse-parseopt.sh | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index 3d450ed379..20924506af 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 <options> -b, --boolean get a boolean @@ -46,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 diff --git a/t/t1502-rev-parse-parseopt.sh b/t/t1502-rev-parse-parseopt.sh index e504058062..4346795855 100755 --- a/t/t1502-rev-parse-parseopt.sh +++ b/t/t1502-rev-parse-parseopt.sh @@ -3,7 +3,8 @@ test_description='test git rev-parse --parseopt' . ./test-lib.sh -cat > expect.err <<EOF +cat > expect <<\END_EXPECT +cat <<\EOF usage: some-command [options] <args>... some-command does foo and bar! @@ -19,6 +20,7 @@ Extras --extra1 line above used to cause a segfault but no longer does EOF +END_EXPECT cat > optionspec << EOF some-command [options] <args>... @@ -38,8 +40,8 @@ extra1 line above used to cause a segfault but no longer does EOF test_expect_success 'test --parseopt help output' ' - git rev-parse --parseopt -- -h 2> output.err < optionspec - test_cmp expect.err output.err + git rev-parse --parseopt -- -h > output < optionspec + test_cmp expect output ' cat > expect <<EOF |