mirror of
https://github.com/git/git.git
synced 2026-03-18 04:30:09 +01:00
Merge branch 'rj/test-fixes' into next
* 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
This commit is contained in:
@@ -13,9 +13,12 @@ test_description='merge-recursive options
|
|||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
|
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
|
||||||
|
test_have_prereq MINGW && export GREP_OPTIONS=-U
|
||||||
|
|
||||||
test_expect_success 'setup' '
|
test_expect_success 'setup' '
|
||||||
conflict_hunks () {
|
conflict_hunks () {
|
||||||
sed -n -e "
|
sed $SED_OPTIONS -n -e "
|
||||||
/^<<<</ b conflict
|
/^<<<</ b conflict
|
||||||
b
|
b
|
||||||
: conflict
|
: conflict
|
||||||
@@ -107,20 +110,6 @@ test_expect_success '--ignore-space-change makes merge succeed' '
|
|||||||
git merge-recursive --ignore-space-change HEAD^ -- HEAD remote
|
git merge-recursive --ignore-space-change HEAD^ -- HEAD remote
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'naive cherry-pick fails' '
|
|
||||||
git read-tree --reset -u HEAD &&
|
|
||||||
test_must_fail git cherry-pick --no-commit remote &&
|
|
||||||
git read-tree --reset -u HEAD &&
|
|
||||||
test_must_fail git cherry-pick remote &&
|
|
||||||
test_must_fail git update-index --refresh &&
|
|
||||||
grep "<<<<<<" text.txt
|
|
||||||
'
|
|
||||||
|
|
||||||
test_expect_success '-Xignore-space-change makes cherry-pick succeed' '
|
|
||||||
git read-tree --reset -u HEAD &&
|
|
||||||
git cherry-pick --no-commit -Xignore-space-change remote
|
|
||||||
'
|
|
||||||
|
|
||||||
test_expect_success '--ignore-space-change: our w/s-only change wins' '
|
test_expect_success '--ignore-space-change: our w/s-only change wins' '
|
||||||
q_to_cr <<-\EOF >expected &&
|
q_to_cr <<-\EOF >expected &&
|
||||||
justice and holiness and is the nurse of his age and theQ
|
justice and holiness and is the nurse of his age and theQ
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ test_description='CRLF merge conflict across text=auto change
|
|||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
test_have_prereq MINGW && SED_OPTIONS=-b
|
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
|
||||||
|
|
||||||
test_expect_success setup '
|
test_expect_success setup '
|
||||||
git config core.autocrlf false &&
|
git config core.autocrlf false &&
|
||||||
|
|||||||
@@ -1057,6 +1057,13 @@ case $(uname -s) in
|
|||||||
# backslashes in pathspec are converted to '/'
|
# backslashes in pathspec are converted to '/'
|
||||||
# exec does not inherit the PID
|
# exec does not inherit the PID
|
||||||
test_set_prereq MINGW
|
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
|
test_set_prereq POSIXPERM
|
||||||
|
|||||||
Reference in New Issue
Block a user