From: Ian Jackson Date: Sat, 11 Aug 2018 15:51:54 +0000 (+0100) Subject: git-debrebase: merge: test: Introduce t-merge-conflicted-* X-Git-Tag: archive/debian/6.7~105 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=9fe91f98a08e948bf3e282cd17f7c2637669a216 git-debrebase: merge: test: Introduce t-merge-conflicted-* NFC Signed-off-by: Ian Jackson --- diff --git a/tests/lib b/tests/lib index 6028133a..e2496b43 100644 --- a/tests/lib +++ b/tests/lib @@ -1025,6 +1025,18 @@ t-make-badcommit () { t-expect-fsck-fail $badcommit } +t-merge-conflicted-stripping-conflict-markers () { + local otherbranch=$1 + local file=$2 + + t-expect-fail F:"Merge conflict in $file" \ + git merge $otherbranch + + perl -i~ -ne 'print unless m{^(?:\<\<\<|\>\>\>|===)}' "$file" + git add "$file" + git commit --no-edit +} + t-commit () { local msg=$1 v=${2:-${majorv:-1}.$revision} diff --git a/tests/tests/gdr-merge b/tests/tests/gdr-merge index b1a215a4..60146913 100755 --- a/tests/tests/gdr-merge +++ b/tests/tests/gdr-merge @@ -32,13 +32,7 @@ echo 'us-conflict' >>debian/zorkmid git commit -m 'us-conflict' debian/zorkmid t-git-debrebase quick -t-expect-fail E:'Merge conflict in debian/zorkmid' \ -git merge other - -perl -i~ -ne 'print unless m{^(?:\<\<\<|\>\>\>|===)}' debian/zorkmid - -git add debian/zorkmid -git commit --no-edit +t-merge-conflicted-stripping-conflict-markers other debian/zorkmid t-expect-fail E:'general two-parent merge' \ t-git-debrebase