Skip to content

Commit 4e27336

Browse files
rybakgitster
authored andcommitted
t1006: assert error output of cat-file
Test "cat-file $arg1 $arg2 error on missing full OID" in t1006-cat-file.sh compares files "expect.err" and "err.actual" to assert the expected error output of "git cat-file". A similar test in the same file named "cat-file $arg1 $arg2 error on missing short OID" also creates these two files, but doesn't use them in assertions. Assert error output of "git cat-file" in test "cat-file $arg1 $arg2 error on missing short OID" of t1006-cat-file.sh to improve test coverage. Signed-off-by: Andrei Rybak <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8fc184c commit 4e27336

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t1006-cat-file.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,8 @@ do
603603
fatal: Not a valid object name $(test_oid deadbeef_short)
604604
EOF
605605
test_must_fail git cat-file $arg1 $arg2 $(test_oid deadbeef_short) >out 2>err.actual &&
606-
test_must_be_empty out
606+
test_must_be_empty out &&
607+
test_cmp expect.err err.actual
607608
'
608609

609610
test_expect_success "cat-file $arg1 $arg2 error on missing full OID" '

0 commit comments

Comments
 (0)