提交 d8f76813 编写于 作者: F Felipe Contreras 提交者: Junio C Hamano

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: NFelipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 dfb1dc5c
......@@ -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' '
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册