'rm -f B' is a lone statement that isn't contained inside any
test_expect_* block.  Use test_when_finished to execute it after the
preceding test has finished.

Signed-off-by: Ramkumar Ramachandra <artag...@gmail.com>
---
 t/t3400-rebase.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index cb4234a..0841a12 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -154,11 +154,11 @@ test_expect_success 'setup: recover' '
 
 test_expect_success 'show verbose error when HEAD could not be detached' '
        >B &&
+       test_when_finished rm -f B &&
        test_must_fail git rebase topic 2>output.err >output.out &&
        grep "The following untracked working tree files would be overwritten 
by checkout:" output.err &&
        grep B output.err
 '
-rm -f B
 
 test_expect_success 'fail when upstream arg is missing and not on branch' '
        git checkout topic &&
-- 
1.8.3.rc1.52.gc14258d

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to