Skip to content

Commit

Permalink
Merge branch 'rj/test-fixes'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Junio C Hamano committed Jan 13, 2011
2 parents 37ee62b + 5b5d53c commit 7810c6b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion t/t3032-merge-recursive-options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion t/t6038-merge-text-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
7 changes: 7 additions & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7810c6b

Please sign in to comment.