From: Junio C Hamano Date: Thu, 13 Jan 2011 19:35:28 +0000 (-0800) Subject: Merge branch 'rj/test-fixes' X-Git-Tag: v1.7.4-rc2~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7810c6b6d6cf91d624216623e2327d7cb63c1c92?ds=inline;hp=-c Merge branch 'rj/test-fixes' * 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 --- 7810c6b6d6cf91d624216623e2327d7cb63c1c92 diff --combined t/t3032-merge-recursive-options.sh index de9ff89d14,29e049af55..44f5421be4 --- a/t/t3032-merge-recursive-options.sh +++ b/t/t3032-merge-recursive-options.sh @@@ -13,16 -13,19 +13,19 @@@ test_description='merge-recursive optio . ./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 n - b inconflict + b conflict " "$@" } && diff --combined t/test-lib.sh index cb1ca973aa,aee7d20cf9..42f2f14496 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@@ -260,7 -260,7 +260,7 @@@ test_decode_color () if (n == 47) return "BWHITE"; } { - while (match($0, /\x1b\[[0-9;]*m/) != 0) { + while (match($0, /\033\[[0-9;]*m/) != 0) { printf "%s<", substr($0, 1, RSTART-1); codes = substr($0, RSTART+2, RLENGTH-3); if (length(codes) == 0) @@@ -1057,6 -1057,13 +1057,13 @@@ case $(uname -s) i # 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