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>
Jonathan Nieder committed
Apr 13, 2012 at 23:48 UTC
948065a4837f006c5c84ee1288cf15f1a56d93f2
1 file changed
+1
-1
t/t4150-am.sh
+1
-1
@@ -525,7 +525,7 @@ test_expect_success 'am empty-file does not infloop' '
525
git reset --hard &&
526
touch empty-file &&
527
test_tick &&
528
- { git am empty-file > actual 2>&1 && false || :; } &&
528
+ test_must_fail git am empty-file 2>actual &&
529
echo Patch format detection failed. >expected &&
530
test_i18ncmp expected actual
531
'