Skip to content

Commit 906a9a7

Browse files
Ramsay Jonesgitster
authored andcommitted
t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
The test using the conflict_hunks helper function (test 9) fails on cygwin, since sed (by default) throws away the CR from CRLF line endings. This behaviour is undesirable, since the validation code expects the CRLF line-ending to be present. In order to fix the problem we pass the -b (--binary) option to sed, using the SED_OPTIONS variable. We use the SED_STRIPS_CR prerequisite in the conditional initialisation of SED_OPTIONS. Signed-off-by: Ramsay Jones <[email protected]> Acked-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a31d066 commit 906a9a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/t3032-merge-recursive-options.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ test_description='merge-recursive options
1313

1414
. ./test-lib.sh
1515

16+
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
17+
1618
test_expect_success 'setup' '
1719
conflict_hunks () {
18-
sed -n -e "
20+
sed $SED_OPTIONS -n -e "
1921
/^<<<</ b inconflict
2022
b
2123
: inconflict

0 commit comments

Comments
 (0)