summaryrefslogtreecommitdiff
path: root/t/t9300-fast-import.sh
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2015-11-19 19:09:44 (GMT)
committerJeff King <peff@peff.net>2015-11-20 13:02:06 (GMT)
commitb08d82f0e8c373bfa463fc8df1419db24fbfc494 (patch)
tree5d857083d3464876abbd74227661529b98131ddb /t/t9300-fast-import.sh
parentd67824feaa1613d363834b93e40c70b93791952b (diff)
downloadgit-b08d82f0e8c373bfa463fc8df1419db24fbfc494.zip
git-b08d82f0e8c373bfa463fc8df1419db24fbfc494.tar.gz
git-b08d82f0e8c373bfa463fc8df1419db24fbfc494.tar.bz2
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>
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-xt/t9300-fast-import.sh17
1 files changed, 3 insertions, 14 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 566f7bd..e9c7602 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -630,20 +630,9 @@ from refs/heads/branch
INPUT_END
test_expect_success 'F: non-fast-forward update skips' '
- if git fast-import <input
- then
- echo BAD gfi did not fail
- 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_must_fail git fast-import <input &&
+ # branch must remain unaffected
+ test $old_branch = `git rev-parse --verify branch^0`
'
test_expect_success 'F: verify pack' '