Skip to content

Commit

Permalink
t1400 (update-ref): use test_must_fail
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Nov 9, 2010
1 parent 2b5ec01 commit 598f087
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions t/t1400-update-ref.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 598f087

Please sign in to comment.