From 906a9a7d1d86b9002813a531ab62f436e798b66b Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Tue, 14 Dec 2010 18:34:29 +0000 Subject: [PATCH] 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 Acked-by: Johannes Sixt Signed-off-by: Junio C Hamano --- t/t3032-merge-recursive-options.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh index 229379755..f70f6c4da 100755 --- a/t/t3032-merge-recursive-options.sh +++ b/t/t3032-merge-recursive-options.sh @@ -13,9 +13,11 @@ test_description='merge-recursive options . ./test-lib.sh +test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b + test_expect_success 'setup' ' conflict_hunks () { - sed -n -e " + sed $SED_OPTIONS -n -e " /^<<<