t: use test_expect_code instead of hand-rolled comparison
This makes our output in the event of a failure slightly nicer, and it means that we do not break the &&-chain. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
35da1bf5d6
commit
c21fc9d0ab
@ -17,8 +17,8 @@ test_expect_success 'setup' '
|
||||
'
|
||||
|
||||
test_expect_success 'git diff --no-index directories' '
|
||||
git diff --no-index a b >cnt
|
||||
test $? = 1 && test_line_count = 14 cnt
|
||||
test_expect_code 1 git diff --no-index a b >cnt &&
|
||||
test_line_count = 14 cnt
|
||||
'
|
||||
|
||||
test_expect_success 'git diff --no-index relative path outside repo' '
|
||||
|
Reference in New Issue
Block a user