@matheusbsbs / matheus-bagliano / commits / a31d066524
Fork 0

t6038-*.sh: Pass the -b (--binary) option to sed on cygwin

The tests using the fuzz_conflict helper function (tests 5-6) fail on cygwin in the same way they used to on MinGW, prior to commit ca02ad3. The solution is also the same; passing the -b (--binary) option to sed, using the SED_OPTIONS variable. We introduce a new prerequisite SED_STRIPS_CR to use in the conditional initialisation of SED_OPTIONS, rather than MINGW. The new prerequisite is set in test-lib.sh for both MinGW and Cygwin. 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:32 UTC a31d066524e55351b385e34f9494f36e9f960a6c
2 files changed +9 -1
t/t6038-merge-text-auto.sh
+1 -1
@@ -14,7 +14,7 @@ test_description='CRLF merge conflict across text=auto change
14
15 . ./test-lib.sh
16
17 -test_have_prereq MINGW && SED_OPTIONS=-b
17 +test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
18
19 test_expect_success setup '
20 git config core.autocrlf false &&
t/test-lib.sh
+8
@@ -1057,6 +1057,14 @@ case $(uname -s) in
1057 # backslashes in pathspec are converted to '/'
1058 # exec does not inherit the PID
1059 test_set_prereq MINGW
1060 + test_set_prereq SED_STRIPS_CR
1061 + ;;
1062 +*CYGWIN*)
1063 + test_set_prereq POSIXPERM
1064 + test_set_prereq BSLASHPSPEC
1065 + test_set_prereq EXECKEEPSPID
1066 + test_set_prereq NOT_MINGW
1067 + test_set_prereq SED_STRIPS_CR
1068 ;;
1069 *)
1070 test_set_prereq POSIXPERM