From: Mark Levedahl <mlevedahl@gmail.com>
To: gitster@pobox.com, ramsay@ramsay1.demon.co.uk, jrnieder@gmail.com
Cc: git@vger.kernel.org, Mark Levedahl <mlevedahl@gmail.com>
Subject: [PATCH] test-lib.sh - define and use GREP_STRIPS_CR
Date: Thu, 18 Jul 2013 17:44:57 -0400 [thread overview]
Message-ID: <1374183897-11408-1-git-send-email-mlevedahl@gmail.com> (raw)
In-Reply-To: <7vtxjt56dc.fsf@alter.siamese.dyndns.org>
Define a common macro for grep needing -U to allow tests to not need
to inquire of specific platforms needing this option. Change
t3032 and t5560 to use this rather than testing explicitly for mingw.
This fixes these two tests on Cygwin.
Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
---
This replaces my earlier patch against t3032 (8896b287 on pu)
t/t3032-merge-recursive-options.sh | 2 +-
t/t5560-http-backend-noserver.sh | 2 +-
t/test-lib.sh | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh
index 2b17311..5fd7bbb 100755
--- a/t/t3032-merge-recursive-options.sh
+++ b/t/t3032-merge-recursive-options.sh
@@ -14,7 +14,7 @@ test_description='merge-recursive options
. ./test-lib.sh
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
-test_have_prereq MINGW && export GREP_OPTIONS=-U
+test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
test_expect_success 'setup' '
conflict_hunks () {
diff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh
index ef98d95..9be9ae3 100755
--- a/t/t5560-http-backend-noserver.sh
+++ b/t/t5560-http-backend-noserver.sh
@@ -5,7 +5,7 @@ test_description='test git-http-backend-noserver'
HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
-test_have_prereq MINGW && export GREP_OPTIONS=-U
+test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
run_backend() {
echo "$2" |
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 2d63307..1abea40 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -824,6 +824,7 @@ case $(uname -s) in
test_set_prereq MINGW
test_set_prereq NOT_CYGWIN
test_set_prereq SED_STRIPS_CR
+ test_set_prereq GREP_STRIPS_CR
;;
*CYGWIN*)
test_set_prereq POSIXPERM
@@ -831,6 +832,7 @@ case $(uname -s) in
test_set_prereq NOT_MINGW
test_set_prereq CYGWIN
test_set_prereq SED_STRIPS_CR
+ test_set_prereq GREP_STRIPS_CR
;;
*)
test_set_prereq POSIXPERM
--
1.8.3.2.0.13
next prev parent reply other threads:[~2013-07-18 21:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 18:33 t3032 incompatible with Cygwin/Windows Mark Levedahl
2013-07-16 18:49 ` [PATCH] t3032 - make compatible with systems using \r\n as a line ending Mark Levedahl
2013-07-16 18:59 ` Jonathan Nieder
2013-07-16 19:44 ` Mark Levedahl
2013-07-16 20:26 ` Mark Levedahl
2013-07-16 20:32 ` Mark Levedahl
2013-07-17 19:33 ` Junio C Hamano
2013-07-18 21:44 ` Mark Levedahl [this message]
2013-07-20 19:41 ` [PATCH] test-lib.sh - define and use GREP_STRIPS_CR Ramsay Jones
2013-07-21 21:04 ` Junio C Hamano
2013-07-18 19:19 ` [PATCH] t3032 - make compatible with systems using \r\n as a line ending Ramsay Jones
2013-07-18 21:47 ` Mark Levedahl
2013-07-16 18:56 ` t3032 incompatible with Cygwin/Windows Jonathan Nieder
2013-07-18 19:11 ` Ramsay Jones
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=1374183897-11408-1-git-send-email-mlevedahl@gmail.com \
--to=mlevedahl@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=ramsay@ramsay1.demon.co.uk \
/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).