Skip to content

Commit

Permalink
t4124 (apply --whitespace): use test_might_fail
Browse files Browse the repository at this point in the history
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>
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 56641f1 commit 33fc521
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions t/t4124-apply-ws-rule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 33fc521

Please sign in to comment.