Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Potapov <dpotapov@gmail.com>2008-08-03 18:36:18 +0400
committerJunio C Hamano <gitster@pobox.com>2008-08-04 00:22:57 +0400
commit81014073f22736e9dcb9370475af44e67234622f (patch)
treed29ad7f540a7644726824d4e6027e66805a7f34e /t/t1007-hash-object.sh
parent43df4f86e035056605ceb757029181d7ddee1e7e (diff)
correct argument checking test for git hash-object
Because the file name given to stdin did not exist, git hash-object fails to open it and exits with non-zero error code. Thus the test may pass even if there is an error in argument checking. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1007-hash-object.sh')
-rwxr-xr-xt/t1007-hash-object.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
index 1ec0535138..6d505fafeb 100755
--- a/t/t1007-hash-object.sh
+++ b/t/t1007-hash-object.sh
@@ -49,16 +49,16 @@ setup_repo
# Argument checking
test_expect_success "multiple '--stdin's are rejected" '
- test_must_fail git hash-object --stdin --stdin < example
+ echo example | test_must_fail git hash-object --stdin --stdin
'
test_expect_success "Can't use --stdin and --stdin-paths together" '
- test_must_fail git hash-object --stdin --stdin-paths &&
- test_must_fail git hash-object --stdin-paths --stdin
+ echo example | test_must_fail git hash-object --stdin --stdin-paths &&
+ echo example | test_must_fail git hash-object --stdin-paths --stdin
'
test_expect_success "Can't pass filenames as arguments with --stdin-paths" '
- test_must_fail git hash-object --stdin-paths hello < example
+ echo example | test_must_fail git hash-object --stdin-paths hello
'
# Behavior