@matheusbsbs / matheus-bagliano / commits / 2ed282cc0d
Fork 0

t4254: merge 2 steps of a single test

While we are at it, make sure we run a clean up after testing. In a later patch, we will test for more corrupted patch. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Đoàn Trần Công Danh committed Apr 21, 2020 at 06:54 UTC 2ed282cc0d541d665dc7561ff962566378328bd6
1 file changed +2 -4
t/t4254-am-corrupt.sh
+2 -4
@@ -25,10 +25,8 @@ test_expect_success setup '
25 # fatal: unable to write file '(null)' mode 100644: Bad address
26 # Also, it had the unwanted side-effect of deleting f.
27 test_expect_success 'try to apply corrupted patch' '
28 - test_must_fail git -c advice.amWorkDir=false am bad-patch.diff 2>actual
29 -'
30 -
31 -test_expect_success 'compare diagnostic; ensure file is still here' '
28 + test_when_finished "git am --abort" &&
29 + test_must_fail git -c advice.amWorkDir=false am bad-patch.diff 2>actual &&
30 echo "error: git diff header lacks filename information (line 4)" >expected &&
31 test_path_is_file f &&
32 test_i18ncmp expected actual