From: Brian Gernhardt <benji@silverinsanity.com>
To: git@vger.kernel.org
Subject: [PATCH] Fix t4200-rerere for white-space from "wc -l"
Date: Wed, 4 Apr 2007 15:39:05 -0400 [thread overview]
Message-ID: <20070404193905.GA23358@Hermes.local> (raw)
On OS X, wc outputs 6 spaces before the number of lines, so the test
expecting the string "10" failed. Changing the test to use -eq for
numerical equality ignores the problematic whitespace.
Also fix the grammar of the test name while making changes to it.
There's only one preimage, so it's "has", not "have".
---
t/t4200-rerere.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index 8b611bb..cd939ac 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -50,10 +50,10 @@ test_expect_success 'recorded preimage' "grep ======= $rr/preimage"
test_expect_success 'no postimage or thisimage yet' \
"test ! -f $rr/postimage -a ! -f $rr/thisimage"
-test_expect_success 'preimage have right number of lines' '
+test_expect_success 'preimage has right number of lines' '
cnt=$(sed -ne "/^<<<<<<</,/^>>>>>>>/p" $rr/preimage | wc -l) &&
- test "$cnt" = 10
+ test "$cnt" -eq 10
'
--
1.5.1.rc3.30.ga8f4
reply other threads:[~2007-04-04 19:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070404193905.GA23358@Hermes.local \
--to=benji@silverinsanity.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.
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 NNTP newsgroup(s).