Skip to content

Commit 97669ee

Browse files
mark987gitster
authored andcommitted
test-lib.sh - define and use GREP_STRIPS_CR
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f59bebb commit 97669ee

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

t/t3032-merge-recursive-options.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test_description='merge-recursive options
1414
. ./test-lib.sh
1515

1616
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
17-
test_have_prereq MINGW && export GREP_OPTIONS=-U
17+
test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
1818

1919
test_expect_success 'setup' '
2020
conflict_hunks () {

t/t5560-http-backend-noserver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test_description='test git-http-backend-noserver'
55

66
HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
77

8-
test_have_prereq MINGW && export GREP_OPTIONS=-U
8+
test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
99

1010
run_backend() {
1111
echo "$2" |

t/test-lib.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,13 +668,15 @@ case $(uname -s) in
668668
test_set_prereq MINGW
669669
test_set_prereq NOT_CYGWIN
670670
test_set_prereq SED_STRIPS_CR
671+
test_set_prereq GREP_STRIPS_CR
671672
;;
672673
*CYGWIN*)
673674
test_set_prereq POSIXPERM
674675
test_set_prereq EXECKEEPSPID
675676
test_set_prereq NOT_MINGW
676677
test_set_prereq CYGWIN
677678
test_set_prereq SED_STRIPS_CR
679+
test_set_prereq GREP_STRIPS_CR
678680
;;
679681
*)
680682
test_set_prereq POSIXPERM

0 commit comments

Comments
 (0)