]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1450: don't create unused files
authorAndrei Rybak <rybak.a.v@gmail.com>
Mon, 17 Apr 2023 19:10:42 +0000 (21:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 May 2023 15:53:03 +0000 (08:53 -0700)
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 31deb28f5e (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 <rybak.a.v@gmail.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1450-fsck.sh

index fdb886dfe431f36dfc4ef6bcf24abf6827c2243d..f49f878fdc06464603918e47b4b019a721e148b8 100755 (executable)
@@ -989,10 +989,7 @@ test_expect_success 'fsck error and recovery on invalid object type' '
 
                garbage_blob=$(git hash-object --stdin -w -t garbage --literally </dev/null) &&
 
-               cat >err.expect <<-\EOF &&
-               fatal: invalid object type
-               EOF
-               test_must_fail git fsck >out 2>err &&
+               test_must_fail git fsck 2>err &&
                grep -e "^error" -e "^fatal" err >errors &&
                test_line_count = 1 errors &&
                grep "$garbage_blob: object is of unknown type '"'"'garbage'"'"':" err