aboutsummaryrefslogtreecommitdiff
path: root/t/t4150-am.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2012-04-13 23:48:13 -0500
committerJunio C Hamano <gitster@pobox.com>2012-04-14 16:17:12 -0700
commit948065a4837f006c5c84ee1288cf15f1a56d93f2 (patch)
treeb383ca4a6fe80196fa36421ce248b6c3b84dffd0 /t/t4150-am.sh
parentb1f5b7839c3bce2accda8b70e03ccc62ad778dd9 (diff)
downloadgit-948065a4837f006c5c84ee1288cf15f1a56d93f2.tar.gz
git-948065a4837f006c5c84ee1288cf15f1a56d93f2.tar.xz
test: am of empty patch should not succeed
The "git am empty" test uses the construct git am empty-file && false || : which unconditionally returns true. Use test_must_fail instead, which also has the benefit of noticing if "git am" has segfaulted. While at it, tighten the test to check that the diagnostic appears on stderr and not stdout. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4150-am.sh')
-rwxr-xr-xt/t4150-am.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index ebb4a26a0..cdafd7e7c 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -525,7 +525,7 @@ test_expect_success 'am empty-file does not infloop' '
git reset --hard &&
touch empty-file &&
test_tick &&
- { git am empty-file > actual 2>&1 && false || :; } &&
+ test_must_fail git am empty-file 2>actual &&
echo Patch format detection failed. >expected &&
test_i18ncmp expected actual
'