Merge branch 'rj/test-fixes'
authorJunio C Hamano <gitster@pobox.com>
Thu, 13 Jan 2011 19:35:28 +0000 (11:35 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Jan 2011 19:35:28 +0000 (11:35 -0800)
* rj/test-fixes:
t4135-*.sh: Skip the "backslash" tests on cygwin
t3032-*.sh: Do not strip CR from line-endings while grepping on MinGW
t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
t6038-*.sh: Pass the -b (--binary) option to sed on cygwin

Conflicts:
t/t3032-merge-recursive-options.sh

t/t3032-merge-recursive-options.sh
t/t6038-merge-text-auto.sh
t/test-lib.sh
index de9ff89d14ff97f1691efee3a670084d4f20a249..44f5421be45579b10c5556a958404ad2daa02002 100755 (executable)
@@ -13,9 +13,12 @@ test_description='merge-recursive options
 
 . ./test-lib.sh
 
+test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
+test_have_prereq MINGW && export GREP_OPTIONS=-U
+
 test_expect_success 'setup' '
        conflict_hunks () {
-               sed -n -e "
+               sed $SED_OPTIONS -n -e "
                        /^<<<</ b conflict
                        b
                        : conflict
index 460bf741b594d4d6b7f2220ac0f1a0d28c653619..d9c2d386ddf8caff4b87fa457c23757f76c293c7 100755 (executable)
@@ -14,7 +14,7 @@ test_description='CRLF merge conflict across text=auto change
 
 . ./test-lib.sh
 
-test_have_prereq MINGW && SED_OPTIONS=-b
+test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
 
 test_expect_success setup '
        git config core.autocrlf false &&
index cb1ca973aa16d82b3c52cc2b7834d977887567a2..42f2f144969a0671b3431f21f659beaff2c53b3d 100644 (file)
@@ -1057,6 +1057,13 @@ case $(uname -s) in
        # backslashes in pathspec are converted to '/'
        # exec does not inherit the PID
        test_set_prereq MINGW
+       test_set_prereq SED_STRIPS_CR
+       ;;
+*CYGWIN*)
+       test_set_prereq POSIXPERM
+       test_set_prereq EXECKEEPSPID
+       test_set_prereq NOT_MINGW
+       test_set_prereq SED_STRIPS_CR
        ;;
 *)
        test_set_prereq POSIXPERM