summaryrefslogtreecommitdiff
path: root/t/t1400-update-ref.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-10-31 02:36:19 -0500
committerJunio C Hamano <gitster@pobox.com>2010-11-09 15:00:29 -0800
commit598f0877aa36b5482734091ffef30e21b4e79803 (patch)
tree3bd13df75b159b828602f3534e4bcfa07e92a4be /t/t1400-update-ref.sh
parent2b5ec018458bd32f554d4395231680235104d8d8 (diff)
downloadgit-598f0877aa36b5482734091ffef30e21b4e79803.tar.gz
t1400 (update-ref): use test_must_fail
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1400-update-ref.sh')
-rwxr-xr-xt/t1400-update-ref.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index d17551eb72..ff747f8229 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 \