]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1004-read-tree-m-u-wf.sh
tests: clean after SANITY tests
[thirdparty/git.git] / t / t1004-read-tree-m-u-wf.sh
index c7ce5d8bb588215d528fad5dfa6aa094d2a5d468..826cd32e231607e3cd46f9c0314908583c01a093 100755 (executable)
@@ -179,6 +179,8 @@ test_expect_success 'funny symlink in work tree' '
 
 test_expect_success SANITY 'funny symlink in work tree, un-unlink-able' '
 
+       test_when_finished "chmod u+w a 2>/dev/null; rm -fr a b" &&
+
        rm -fr a b &&
        git reset --hard &&
 
@@ -188,10 +190,6 @@ test_expect_success SANITY 'funny symlink in work tree, un-unlink-able' '
 
 '
 
-# clean-up from the above test
-chmod a+w a 2>/dev/null
-rm -fr a b
-
 test_expect_success 'D/F setup' '
 
        git reset --hard &&