[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    [PATCH 10/10] t4124 (apply --whitespace): use test_might_fail
From:       Jonathan Nieder <jrnieder () gmail ! com>
Date:       2010-10-31 7:41:08
Message-ID: 20101031074108.GK11483 () burratino
[Download RAW message or body]

Use test_might_fail instead of ignoring the exit status from git
config --unset, and let the exit status propagate past rm -f (which
does not fail on ENOENT).  Otherwise bugs that lead git config to
crash would not be detected when this test runs.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 t/t4124-apply-ws-rule.sh |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh
index 414b09b..61bfc56 100755
--- a/t/t4124-apply-ws-rule.sh
+++ b/t/t4124-apply-ws-rule.sh
@@ -176,9 +176,8 @@ test_expect_success 'trailing whitespace & no newline at the end of file' '
 '
 
 test_expect_success 'blank at EOF with --whitespace=fix (1)' '
-	: these can fail depending on what we did before
-	git config --unset core.whitespace
-	rm -f .gitattributes
+	test_might_fail git config --unset core.whitespace &&
+	rm -f .gitattributes &&
 
 	{ echo a; echo b; echo c; } >one &&
 	git add one &&
-- 
1.7.2.3.557.gab647.dirty

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

Configure | About | News | Add a list | Sponsored by KoreLogic