Skip to content

Commit 59162ec

Browse files
rybakgitster
authored andcommitted
t1450: don't create unused files
Test 'fsck error and recovery on invalid object type' in file t1450-fsck.sh redirects output of a failing "git fsck" invocation to files "out" and "err" to assert presence of error messages in the output of the command. Commit 31deb28 (fsck: don't hard die on invalid object types, 2021-10-01) changed the way assertions in this test are performed. The test doesn't compare the whole standard error with prepared file "err.expect" and it doesn't assert that standard output is empty. Don't create unused files "err.expect" and "out" in test 'fsck error and recovery on invalid object type'. Signed-off-by: Andrei Rybak <[email protected]> Reviewed-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a7cae29 commit 59162ec

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

t/t1450-fsck.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -989,10 +989,7 @@ test_expect_success 'fsck error and recovery on invalid object type' '
989989
990990
garbage_blob=$(git hash-object --stdin -w -t garbage --literally </dev/null) &&
991991
992-
cat >err.expect <<-\EOF &&
993-
fatal: invalid object type
994-
EOF
995-
test_must_fail git fsck >out 2>err &&
992+
test_must_fail git fsck 2>err &&
996993
grep -e "^error" -e "^fatal" err >errors &&
997994
test_line_count = 1 errors &&
998995
grep "$garbage_blob: object is of unknown type '"'"'garbage'"'"':" err

0 commit comments

Comments
 (0)