From: Karl Hasselström Date: Fri, 24 Aug 2007 09:49:24 +0000 (+0200) Subject: Don't use test_expect_failure when more than one thing could fail X-Git-Tag: v0.14~118 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/675394bcf1ec6fbcd0e4018e136dc65206952b09 Don't use test_expect_failure when more than one thing could fail It's much better to use ! for the part that you actually expect to fail; that way, the test will still scream if something _else_ goes wrong. Signed-off-by: Karl Hasselström --- diff --git a/t/t2101-pull-policy-pull.sh b/t/t2101-pull-policy-pull.sh index 793491c..14d5adb 100755 --- a/t/t2101-pull-policy-pull.sh +++ b/t/t2101-pull-policy-pull.sh @@ -39,11 +39,11 @@ test_expect_success \ # as rewinding, and thus heads/origin is not moved, but the stack # is still correctly rebased -test_expect_failure \ +test_expect_success \ 'Rewind/rewrite upstream commit and pull it from clone, without --merged' \ ' (cd upstream && echo b >> file2 && stg refresh) && - (cd clone && stg pull) + (cd clone && ! stg pull) ' test_expect_success \