From: Ramsay Jones Date: Tue, 14 Dec 2010 18:34:29 +0000 (+0000) Subject: t3032-*.sh: Pass the -b (--binary) option to sed on cygwin X-Git-Tag: v1.7.4-rc2~5^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=906a9a7d1d86b9002813a531ab62f436e798b66b;p=git.git 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 --- 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 " /^<<<