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:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-09-03 21:06:18 +0400
committerJunio C Hamano <gitster@pobox.com>2013-09-03 23:54:52 +0400
commitd8f7681337dd0c7944ba2293a72952110977077d (patch)
tree163208bbf711f9748d924d7d7b54fee58963739e /t/t6101-rev-parse-parents.sh
parentdfb1dc5c336f3fa709e32ce178525768713747f2 (diff)
rev-parse test: use test_must_fail, not "if <command>; then false; fi"
This way, if rev-parse segfaults then the test will fail instead of treating it the same way as a controlled failure. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6101-rev-parse-parents.sh')
-rwxr-xr-xt/t6101-rev-parse-parents.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh
index c47b8695da..416067c374 100755
--- a/t/t6101-rev-parse-parents.sh
+++ b/t/t6101-rev-parse-parents.sh
@@ -26,7 +26,7 @@ test_expect_success 'start^0' '
'
test_expect_success 'start^1 not valid' '
- if git rev-parse --verify start^1; then false; else :; fi
+ test_must_fail git rev-parse --verify start^1
'
test_expect_success 'second^1 = second^' '
@@ -50,7 +50,7 @@ test_expect_success 'final^1^2 != final^1^1' '
'
test_expect_success 'final^1^3 not valid' '
- if git rev-parse --verify final^1^3; then false; else :; fi
+ test_must_fail git rev-parse --verify final^1^3
'
test_expect_success '--verify start2^1' '