[StGIT PATCH 1/4] Don't use test_expect_failure when more than one thing could fail
- From
Karl Hasselström <kha@treskal.com>
- Date
- Aug 26, 2007, 20:26 UTC
- Message-ID
- <20070826202615.15933.76401.stgit@yoghurt>
- In-Reply-To
- <20070826202309.15933.54183.stgit@yoghurt>
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 <kha@treskal.com>
---
t/t2101-pull-policy-pull.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
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 \