summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 16:51:54 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 17:05:56 +0100
commit9fe91f98a08e948bf3e282cd17f7c2637669a216 (patch)
tree6cbfb60c858ef71318d39a3933c7d5f029f7ed51 /tests/lib
parent79c61ce4926d8bb167fcdc5dd494c667ed4e9fbd (diff)
git-debrebase: merge: test: Introduce t-merge-conflicted-*
NFC Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/lib b/tests/lib
index 6028133..e2496b4 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}