aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2010-12-14 18:34:29 +0000
committerJunio C Hamano <gitster@pobox.com>2011-01-08 23:36:37 -0800
commit906a9a7d1d86b9002813a531ab62f436e798b66b (patch)
treecae0b11b30a3a23cccfa3ca954ca765bd5c33262 /t
parenta31d066524e55351b385e34f9494f36e9f960a6c (diff)
downloadgit-906a9a7d1d86b9002813a531ab62f436e798b66b.tar.gz
git-906a9a7d1d86b9002813a531ab62f436e798b66b.tar.xz
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>
Diffstat (limited to 't')
-rwxr-xr-xt/t3032-merge-recursive-options.sh4
1 files changed, 3 insertions, 1 deletions
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 "
/^<<<</ b inconflict
b
: inconflict