Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
modernize t9300: use test_must_fail
author
Johannes Sixt
<j6t@kdbg.org>
Thu, 19 Nov 2015 19:09:44 +0000
(20:09 +0100)
committer
Jeff King
<peff@peff.net>
Fri, 20 Nov 2015 13:02:06 +0000
(08:02 -0500)
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>
t/t9300-fast-import.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
d67824f
)
diff --git
a/t/t9300-fast-import.sh
b/t/t9300-fast-import.sh
index 566f7bdd30436006615aa882d67531c29e41f3b2..e9c760284950ee990224d45a22eae72f3e65205c 100755
(executable)
--- 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' '
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' '
'
test_expect_success 'F: verify pack' '