modernize t9300: use test_must_fail

One test case open-codes a test for an expected failure. Replace it by
test_must_fail.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
maint
Johannes Sixt 2015-11-19 20:09:44 +01:00 committed by Jeff King
parent d67824feaa
commit b08d82f0e8
1 changed files with 3 additions and 14 deletions

View File

@ -630,20 +630,9 @@ from refs/heads/branch


INPUT_END INPUT_END
test_expect_success 'F: non-fast-forward update skips' ' test_expect_success 'F: non-fast-forward update skips' '
if git fast-import <input test_must_fail git fast-import <input &&
then # branch must remain unaffected
echo BAD gfi did not fail test $old_branch = `git rev-parse --verify branch^0`
return 1
else
if test $old_branch = `git rev-parse --verify branch^0`
then
: branch unaffected and failure returned
return 0
else
echo BAD gfi changed branch $old_branch
return 1
fi
fi
' '


test_expect_success 'F: verify pack' ' test_expect_success 'F: verify pack' '