git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGIT PATCH 1/4] Don't use test_expect_failure when more than one thing could fail
Date: Sun, 26 Aug 2007 22:26:15 +0200	[thread overview]
Message-ID: <20070826202615.15933.76401.stgit@yoghurt> (raw)
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 \

  reply	other threads:[~2007-08-26 20:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-26 20:26 [StGIT PATCH 0/4] Miscellaneous fixes Karl Hasselström
2007-08-26 20:26 ` Karl Hasselström [this message]
2007-08-26 20:26 ` [StGIT PATCH 2/4] Don't write None to the conf file Karl Hasselström
2007-08-26 20:26 ` [StGIT PATCH 3/4] Replace "git repo-config" with "git config" in help texts Karl Hasselström
2007-08-26 20:26 ` [StGIT PATCH 4/4] Compile regexp just once Karl Hasselström
2007-08-29 10:18 ` [StGIT PATCH 0/4] Miscellaneous fixes Catalin Marinas
2007-08-29 11:17   ` Karl Hasselström
2007-09-03  8:40     ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070826202615.15933.76401.stgit@yoghurt \
    --to=kha@treskal.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).