@matheusbsbs / matheus-bagliano / commits / 906a9a7d1d
Fork 0

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 <ramsay@ramsay1.demon.co.uk> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ramsay Jones committed Dec 14, 2010 at 18:34 UTC 906a9a7d1d86b9002813a531ab62f436e798b66b
1 file changed +3 -1
t/t3032-merge-recursive-options.sh
+3 -1
@@ -13,9 +13,11 @@ test_description='merge-recursive options
13
14 . ./test-lib.sh
15
16 +test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
17 +
18 test_expect_success 'setup' '
19 conflict_hunks () {
18 - sed -n -e "
20 + sed $SED_OPTIONS -n -e "
21 /^<<<</ b inconflict
22 b
23 : inconflict