aboutsummaryrefslogtreecommitdiff
path: root/t/t0040-parse-options.sh
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivano@gnu.org>2010-05-17 17:34:41 +0200
committerJunio C Hamano <gitster@pobox.com>2010-05-31 18:06:41 -0700
commit9c7304e3e39ed397b3cc6566573333e2698a52b4 (patch)
treefb0b9f66cd82761e67ae77074c973acb4bf6fa1a /t/t0040-parse-options.sh
parent81fa024cd8e336ba257f13fe7724b95baacfa3ad (diff)
downloadgit-9c7304e3e39ed397b3cc6566573333e2698a52b4.tar.gz
git-9c7304e3e39ed397b3cc6566573333e2698a52b4.tar.xz
print the usage string on stdout instead of stderr
When -h is used, print usage messages on stdout. If a command is invoked with wrong arguments then print the usage messages on stderr. Signed-off-by: Giuseppe Scrivano <gscrivano@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0040-parse-options.sh')
-rwxr-xr-xt/t0040-parse-options.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh
index 3d450ed37..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 <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