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

List:       git
Subject:    [PATCH 05/10] t1400 (update-ref): use test_must_fail
From:       Jonathan Nieder <jrnieder () gmail ! com>
Date:       2010-10-31 7:36:19
Message-ID: 20101031073619.GF11483 () burratino
[Download RAW message or body]

As t/README explains:

	When a gitcommand dies due to a segfault, test_must_fail
	diagnoses it as an error; "! git <command>" treats it as
	just another expected failure, which would let such a bug
	go unnoticed.

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

diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index d17551e..ff747f8 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -52,9 +52,8 @@ rm -f .git/$m
 
 test_expect_success \
 	"fail to create $n" \
-	"touch .git/$n_dir
-	 git update-ref $n $A >out 2>err"'
-	 test $? != 0'
+	"touch .git/$n_dir &&
+	 test_must_fail git update-ref $n $A >out 2>err"
 rm -f .git/$n_dir out err
 
 test_expect_success \
-- 
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