From: Bernd Ahlers <bernd@ba-net.org>
To: git@vger.kernel.org
Subject: [PATCH] Use 'grep -a' to fix some errors with non-GNU grep(1).
Date: Fri, 28 Mar 2008 23:40:11 +0100 [thread overview]
Message-ID: <20080328224011.GB5486@dengar.tuneafish.de> (raw)
This fixes test errors on OpenBSD.
Signed-off-by: Bernd Ahlers <bernd@ba-net.org>
---
t/t4019-diff-wserror.sh | 28 ++++++++++++++--------------
t/t9200-git-cvsexportcommit.sh | 2 +-
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/t/t4019-diff-wserror.sh b/t/t4019-diff-wserror.sh
index 0d9cbb6..275b41a 100755
--- a/t/t4019-diff-wserror.sh
+++ b/t/t4019-diff-wserror.sh
@@ -22,8 +22,8 @@ blue_grep='7;34m' ;# ESC [ 7 ; 3 4 m
test_expect_success default '
git diff --color >output
- grep "$blue_grep" output >error
- grep -v "$blue_grep" output >normal
+ grep -a "$blue_grep" output >error
+ grep -a -v "$blue_grep" output >normal
grep Eight normal >/dev/null &&
grep HT error >/dev/null &&
@@ -37,8 +37,8 @@ test_expect_success 'without -trail' '
git config core.whitespace -trail
git diff --color >output
- grep "$blue_grep" output >error
- grep -v "$blue_grep" output >normal
+ grep -a "$blue_grep" output >error
+ grep -a -v "$blue_grep" output >normal
grep Eight normal >/dev/null &&
grep HT error >/dev/null &&
@@ -53,8 +53,8 @@ test_expect_success 'without -trail (attribute)' '
git config --unset core.whitespace
echo "F whitespace=-trail" >.gitattributes
git diff --color >output
- grep "$blue_grep" output >error
- grep -v "$blue_grep" output >normal
+ grep -a "$blue_grep" output >error
+ grep -a -v "$blue_grep" output >normal
grep Eight normal >/dev/null &&
grep HT error >/dev/null &&
@@ -69,8 +69,8 @@ test_expect_success 'without -space' '
rm -f .gitattributes
git config core.whitespace -space
git diff --color >output
- grep "$blue_grep" output >error
- grep -v "$blue_grep" output >normal
+ grep -a "$blue_grep" output >error
+ grep -a -v "$blue_grep" output >normal
grep Eight normal >/dev/null &&
grep HT normal >/dev/null &&
@@ -85,8 +85,8 @@ test_expect_success 'without -space (attribute)' '
git config --unset core.whitespace
echo "F whitespace=-space" >.gitattributes
git diff --color >output
- grep "$blue_grep" output >error
- grep -v "$blue_grep" output >normal
+ grep -a "$blue_grep" output >error
+ grep -a -v "$blue_grep" output >normal
grep Eight normal >/dev/null &&
grep HT normal >/dev/null &&
@@ -101,8 +101,8 @@ test_expect_success 'with indent-non-tab only' '
rm -f .gitattributes
git config core.whitespace indent,-trailing,-space
git diff --color >output
- grep "$blue_grep" output >error
- grep -v "$blue_grep" output >normal
+ grep -a "$blue_grep" output >error
+ grep -a -v "$blue_grep" output >normal
grep Eight error >/dev/null &&
grep HT normal >/dev/null &&
@@ -117,8 +117,8 @@ test_expect_success 'with indent-non-tab only (attribute)' '
git config --unset core.whitespace
echo "F whitespace=indent,-trailing,-space" >.gitattributes
git diff --color >output
- grep "$blue_grep" output >error
- grep -v "$blue_grep" output >normal
+ grep -a "$blue_grep" output >error
+ grep -a -v "$blue_grep" output >normal
grep Eight error >/dev/null &&
grep HT normal >/dev/null &&
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 42b144b..d3bd48c 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -30,7 +30,7 @@ exit 1
check_entries () {
# $1 == directory, $2 == expected
- grep '^/' "$1/CVS/Entries" | sort | cut -d/ -f2,3,5 >actual
+ grep -a '^/' "$1/CVS/Entries" | sort | cut -d/ -f2,3,5 >actual
if test -z "$2"
then
>expected
--
1.5.4.5
next reply other threads:[~2008-03-28 23:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 22:40 Bernd Ahlers [this message]
2008-03-29 0:49 ` [PATCH] Use 'grep -a' to fix some errors with non-GNU grep(1) Jeff King
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=20080328224011.GB5486@dengar.tuneafish.de \
--to=bernd@ba-net.org \
--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).