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>
Johannes Sixt committed
Nov 19, 2015 at 20:09 UTC
b08d82f0e8c373bfa463fc8df1419db24fbfc494
1 file changed
+3
-14
t/t9300-fast-import.sh
+3
-14
@@ -630,20 +630,9 @@ from refs/heads/branch
630
631
INPUT_END
632
test_expect_success 'F: non-fast-forward update skips' '
633
- if git fast-import <input
634
- then
635
- echo BAD gfi did not fail
636
- return 1
637
- else
638
- if test $old_branch = `git rev-parse --verify branch^0`
639
- then
640
- : branch unaffected and failure returned
641
- return 0
642
- else
643
- echo BAD gfi changed branch $old_branch
644
- return 1
645
- fi
646
- fi
633
+ test_must_fail git fast-import <input &&
634
+ # branch must remain unaffected
635
+ test $old_branch = `git rev-parse --verify branch^0`
636
'
637
638
test_expect_success 'F: verify pack' '