Skip to content

Commit a31d066

Browse files
Ramsay Jonesgitster
authored andcommitted
t6038-*.sh: Pass the -b (--binary) option to sed on cygwin
The tests using the fuzz_conflict helper function (tests 5-6) fail on cygwin in the same way they used to on MinGW, prior to commit ca02ad3. The solution is also the same; passing the -b (--binary) option to sed, using the SED_OPTIONS variable. We introduce a new prerequisite SED_STRIPS_CR to use in the conditional initialisation of SED_OPTIONS, rather than MINGW. The new prerequisite is set in test-lib.sh for both MinGW and Cygwin. Signed-off-by: Ramsay Jones <[email protected]> Acked-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0137ef7 commit a31d066

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

t/t6038-merge-text-auto.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test_description='CRLF merge conflict across text=auto change
1414

1515
. ./test-lib.sh
1616

17-
test_have_prereq MINGW && SED_OPTIONS=-b
17+
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
1818

1919
test_expect_success setup '
2020
git config core.autocrlf false &&

t/test-lib.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,14 @@ case $(uname -s) in
10571057
# backslashes in pathspec are converted to '/'
10581058
# exec does not inherit the PID
10591059
test_set_prereq MINGW
1060+
test_set_prereq SED_STRIPS_CR
1061+
;;
1062+
*CYGWIN*)
1063+
test_set_prereq POSIXPERM
1064+
test_set_prereq BSLASHPSPEC
1065+
test_set_prereq EXECKEEPSPID
1066+
test_set_prereq NOT_MINGW
1067+
test_set_prereq SED_STRIPS_CR
10601068
;;
10611069
*)
10621070
test_set_prereq POSIXPERM

0 commit comments

Comments
 (0)