aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-09-24 23:19:13 +0200
committerMattias Andrée <m@maandree.se>2026-09-24 23:19:13 +0200
commit9b98f1a9222e5e96949bf74538a97900f2d847b1 (patch)
tree468ab35cb2ac75ef1c48d76189520ee9bad23495 /t
parentAdd conflcit resultions strategies and interactive mode, and a lot of tests (diff)
downloadgit-rediff-9b98f1a9222e5e96949bf74538a97900f2d847b1.tar.gz
git-rediff-9b98f1a9222e5e96949bf74538a97900f2d847b1.tar.bz2
git-rediff-9b98f1a9222e5e96949bf74538a97900f2d847b1.tar.xz
Add --symmetricHEADmaster
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 't')
-rwxr-xr-xt/all-positive-options-symmetric23
-rwxr-xr-xt/combination-2-symmetric22
-rwxr-xr-xt/combination-remove-base-symmetric-reduce34
-rwxr-xr-xt/combination-symmetric-2-no-symmetric28
-rwxr-xr-xt/combination-symmetric-reduce36
-rw-r--r--t/common.sh3
-rwxr-xr-xt/invalid-option-combinations49
-rwxr-xr-xt/no-option-merge12
-rwxr-xr-xt/no-option-merge-yes-no6
-rwxr-xr-xt/no-option-reduce-no-yes13
-rwxr-xr-xt/no-option-reduce-yes-no3
-rwxr-xr-xt/no-option-symmetric28
-rwxr-xr-xt/no-option-symmetric-no-yes18
-rwxr-xr-xt/no-option-symmetric-yes-no17
-rwxr-xr-xt/reduce-short-option26
-rwxr-xr-xt/symmetric-111
-rwxr-xr-xt/symmetric-2-different15
-rwxr-xr-xt/symmetric-2-identical16
-rwxr-xr-xt/symmetric-3-all-different17
-rwxr-xr-xt/symmetric-3-all-identical18
-rwxr-xr-xt/symmetric-3-different-base18
-rwxr-xr-xt/symmetric-3-different-head17
-rwxr-xr-xt/symmetric-3-different-tail17
-rwxr-xr-xt/symmetric-3-empty-head16
-rwxr-xr-xt/symmetric-3-empty-head-tail15
-rwxr-xr-xt/symmetric-3-empty-tail16
-rwxr-xr-xt/symmetric-4-different-head19
-rwxr-xr-xt/symmetric-4-different-lower-middle19
-rwxr-xr-xt/symmetric-4-different-tail19
-rwxr-xr-xt/symmetric-4-different-upper-middle19
-rwxr-xr-xt/symmetric-4-identical20
-rwxr-xr-xt/symmetric-4-same-different-middles25
-rwxr-xr-xt/symmetric-4-unique-different-middles23
-rwxr-xr-xt/symmetric-5-different-lower-middle21
-rwxr-xr-xt/symmetric-5-different-upper-middle21
-rwxr-xr-xt/symmetric-multiple-conflicts42
-rwxr-xr-xt/symmetric-multiple-files29
-rwxr-xr-xt/symmetric-no-conflicts11
-rwxr-xr-xt/symmetric-short-option18
39 files changed, 769 insertions, 11 deletions
diff --git a/t/all-positive-options-symmetric b/t/all-positive-options-symmetric
new file mode 100755
index 0000000..eb53cb9
--- /dev/null
+++ b/t/all-positive-options-symmetric
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+. t/common.sh
+interactive
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ ours \
+ "${PARENT} base" \
+ same \
+ base \
+ "${TAIL}" \
+ same \
+ theirs \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ same \
+ ours
+
+printf '%s' h > input
+normal --symmetric --remove-base --reduce --interactive file 8<input 9>output
+test -s output
diff --git a/t/combination-2-symmetric b/t/combination-2-symmetric
new file mode 100755
index 0000000..059897d
--- /dev/null
+++ b/t/combination-2-symmetric
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ new \
+ "${PARENT} base" \
+ same \
+ old \
+ "${TAIL}" \
+ same \
+ new \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ same \
+ new
+
+normal --symmetric --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/combination-remove-base-symmetric-reduce b/t/combination-remove-base-symmetric-reduce
new file mode 100755
index 0000000..c4b1cf9
--- /dev/null
+++ b/t/combination-remove-base-symmetric-reduce
@@ -0,0 +1,34 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ first \
+ "${PARENT} base" \
+ not-first \
+ "${TAIL}" \
+ first \
+ "${END} theirs" \
+ "${HEAD} ours" \
+ ours \
+ common \
+ "${PARENT} base" \
+ base \
+ common \
+ "${TAIL}" \
+ theirs \
+ common \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ first \
+ "${HEAD} ours" \
+ ours \
+ "${TAIL}" \
+ theirs \
+ "${END} theirs" \
+ common
+
+conflict --remove-base --symmetric --reduce file
+
+also_interactive yy
diff --git a/t/combination-symmetric-2-no-symmetric b/t/combination-symmetric-2-no-symmetric
new file mode 100755
index 0000000..6aaf0e0
--- /dev/null
+++ b/t/combination-symmetric-2-no-symmetric
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ new \
+ "${PARENT} base" \
+ same \
+ old \
+ "${TAIL}" \
+ same \
+ new \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ same \
+ "${HEAD} ours" \
+ new \
+ "${PARENT} base" \
+ old \
+ "${TAIL}" \
+ new \
+ "${END} theirs"
+
+conflict --symmetric --no-symmetric --no-symmetric file
+
+also_interactive r
diff --git a/t/combination-symmetric-reduce b/t/combination-symmetric-reduce
new file mode 100755
index 0000000..e5e370a
--- /dev/null
+++ b/t/combination-symmetric-reduce
@@ -0,0 +1,36 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ first \
+ "${PARENT} base" \
+ not-first \
+ "${TAIL}" \
+ first \
+ "${END} theirs" \
+ "${HEAD} ours" \
+ ours \
+ common \
+ "${PARENT} base" \
+ base \
+ common \
+ "${TAIL}" \
+ theirs \
+ common \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ first \
+ "${HEAD} ours" \
+ ours \
+ "${PARENT} base" \
+ base \
+ "${TAIL}" \
+ theirs \
+ "${END} theirs" \
+ common
+
+conflict --symmetric --reduce file
+
+also_interactive yr
diff --git a/t/common.sh b/t/common.sh
index 30e4b6e..38d2845 100644
--- a/t/common.sh
+++ b/t/common.sh
@@ -141,7 +141,7 @@ interactive_filename () {
interactive_prompt () {
test $# = 2
- printf '\e[1;34m(%s/%s) Resolve this conflict [h,t,b,m,r,e,s,d,q,?]? \e[0m\n' "$1" "$2"
+ printf '\e[1;34m(%s/%s) Resolve this conflict [h,t,b,m,y,r,e,s,d,q,?]? \e[0m\n' "$1" "$2"
}
interactive_help () {
@@ -155,6 +155,7 @@ interactive_help () {
fi
printf '%s\n' \
'm - merge' \
+ 'y - select symmetric branches' \
'r - reduce' \
'e - manually edit this hunk' \
's - skip this hunk' \
diff --git a/t/invalid-option-combinations b/t/invalid-option-combinations
index 527ce63..1a75005 100755
--- a/t/invalid-option-combinations
+++ b/t/invalid-option-combinations
@@ -16,5 +16,54 @@ error --select-head --merge --select-tail file
error --select-head --select-tail --merge file
error --select-tail --merge --select-head file
error --select-tail --select-head --merge file
+error --symmetric --merge file
+error --merge --symmetric file
+error --symmetric --select-head file
+error --select-head --symmetric file
+error --symmetric --select-tail file
+error --select-tail --symmetric file
+error --symmetric --merge --select-head file
+error --symmetric --select-head --merge file
+error --symmetric --merge --select-tail file
+error --symmetric --select-tail --merge file
+error --symmetric --select-head --select-tail file
+error --symmetric --select-tail --select-head file
+error --merge --symmetric --select-head file
+error --select-head --symmetric --merge file
+error --merge --symmetric --select-tail file
+error --select-tail --symmetric --merge file
+error --select-head --symmetric --select-tail file
+error --select-tail --symmetric --select-head file
+error --merge --select-head --symmetric file
+error --select-head --merge --symmetric file
+error --merge --select-tail --symmetric file
+error --select-tail --merge --symmetric file
+error --select-head --select-tail --symmetric file
+error --select-tail --select-head --symmetric file
+error --symmetric --merge --select-head --select-tail file
+error --symmetric --merge --select-tail --select-head file
+error --symmetric --select-head --merge --select-tail file
+error --symmetric --select-head --select-tail --merge file
+error --symmetric --select-tail --merge --select-head file
+error --symmetric --select-tail --select-head --merge file
+error --merge --symmetric --select-head --select-tail file
+error --merge --symmetric --select-tail --select-head file
+error --select-head --symmetric --merge --select-tail file
+error --select-head --symmetric --select-tail --merge file
+error --select-tail --symmetric --merge --select-head file
+error --select-tail --symmetric --select-head --merge file
+error --merge --select-head --symmetric --select-tail file
+error --merge --select-tail --symmetric --select-head file
+error --select-head --merge --symmetric --select-tail file
+error --select-head --select-tail --symmetric --merge file
+error --select-tail --merge --symmetric --select-head file
+error --select-tail --select-head --symmetric --merge file
+error --merge --select-head --select-tail --symmetric file
+error --merge --select-tail --select-head --symmetric file
+error --select-head --merge --select-tail --symmetric file
+error --select-head --select-tail --merge --symmetric file
+error --select-tail --merge --select-head --symmetric file
+error --select-tail --select-head --merge --symmetric file
+
error --unknown-option file
error '-$' file
diff --git a/t/no-option-merge b/t/no-option-merge
index 5f55d74..8f9a63e 100755
--- a/t/no-option-merge
+++ b/t/no-option-merge
@@ -4,23 +4,23 @@
printf '%s\n' > file \
"${HEAD} ours" \
same \
- ours \
+ new \
"${PARENT} base" \
same \
- base \
+ old \
"${TAIL}" \
same \
- theirs \
+ old \
"${END} theirs"
printf '%s\n' > file.expected \
same \
"${HEAD} ours" \
- ours \
+ new \
"${PARENT} base" \
- base \
+ old \
"${TAIL}" \
- theirs \
+ old \
"${END} theirs"
conflict --no-merge file
diff --git a/t/no-option-merge-yes-no b/t/no-option-merge-yes-no
index f351e7c..af35ed8 100755
--- a/t/no-option-merge-yes-no
+++ b/t/no-option-merge-yes-no
@@ -3,11 +3,11 @@
printf '%s\n' > file \
"${HEAD} ours" \
- ours \
+ old \
"${PARENT} base" \
- base \
+ old \
"${TAIL}" \
- theirs \
+ new \
"${END} theirs"
cp -- file file.expected
diff --git a/t/no-option-reduce-no-yes b/t/no-option-reduce-no-yes
index e6a7d8c..9078a9b 100755
--- a/t/no-option-reduce-no-yes
+++ b/t/no-option-reduce-no-yes
@@ -3,14 +3,25 @@
printf '%s\n' > file \
"${HEAD} ours" \
+ same \
ours \
"${PARENT} base" \
+ same \
base \
"${TAIL}" \
+ same \
theirs \
"${END} theirs"
-cp -- file file.expected
+printf '%s\n' > file.expected \
+ same \
+ "${HEAD} ours" \
+ ours \
+ "${PARENT} base" \
+ base \
+ "${TAIL}" \
+ theirs \
+ "${END} theirs"
conflict --no-reduce --reduce file
diff --git a/t/no-option-reduce-yes-no b/t/no-option-reduce-yes-no
index 82fa7bd..8a55b15 100755
--- a/t/no-option-reduce-yes-no
+++ b/t/no-option-reduce-yes-no
@@ -3,10 +3,13 @@
printf '%s\n' > file \
"${HEAD} ours" \
+ same \
ours \
"${PARENT} base" \
+ same \
base \
"${TAIL}" \
+ same \
theirs \
"${END} theirs"
diff --git a/t/no-option-symmetric b/t/no-option-symmetric
new file mode 100755
index 0000000..82d6b73
--- /dev/null
+++ b/t/no-option-symmetric
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ new \
+ "${PARENT} base" \
+ same \
+ old \
+ "${TAIL}" \
+ same \
+ new \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ same \
+ "${HEAD} ours" \
+ new \
+ "${PARENT} base" \
+ old \
+ "${TAIL}" \
+ new \
+ "${END} theirs"
+
+conflict --no-symmetric file
+
+also_interactive r
diff --git a/t/no-option-symmetric-no-yes b/t/no-option-symmetric-no-yes
new file mode 100755
index 0000000..45954cb
--- /dev/null
+++ b/t/no-option-symmetric-no-yes
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ new \
+ "${PARENT} base" \
+ old \
+ "${TAIL}" \
+ new \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ new
+
+normal --no-symmetric --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/no-option-symmetric-yes-no b/t/no-option-symmetric-yes-no
new file mode 100755
index 0000000..415467c
--- /dev/null
+++ b/t/no-option-symmetric-yes-no
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} base" \
+ base \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-symmetric --no-reduce file
+
+also_interactive r
diff --git a/t/reduce-short-option b/t/reduce-short-option
new file mode 100755
index 0000000..0e2b5b7
--- /dev/null
+++ b/t/reduce-short-option
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} 1" \
+ common-first \
+ head-second \
+ common-third \
+ "${TAIL} 2" \
+ common-first \
+ tail-second \
+ common-third \
+ "${END} 2"
+
+printf '%s\n' > file.expected \
+ common-first \
+ "${HEAD} 1" \
+ head-second \
+ "${TAIL} 2" \
+ tail-second \
+ "${END} 2" \
+ common-third
+
+conflict -r file
+
+also_interactive r
diff --git a/t/symmetric-1 b/t/symmetric-1
new file mode 100755
index 0000000..f0d1a4b
--- /dev/null
+++ b/t/symmetric-1
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} only" \
+ only \
+ "${END} only"
+
+cp -- file file.expected
+
+error --symmetric --no-reduce file
diff --git a/t/symmetric-2-different b/t/symmetric-2-different
new file mode 100755
index 0000000..889e4ed
--- /dev/null
+++ b/t/symmetric-2-different
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ ours \
+ "${TAIL}" \
+ theirs \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-2-identical b/t/symmetric-2-identical
new file mode 100755
index 0000000..90f8369
--- /dev/null
+++ b/t/symmetric-2-identical
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ same
+
+normal --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-3-all-different b/t/symmetric-3-all-different
new file mode 100755
index 0000000..0693a80
--- /dev/null
+++ b/t/symmetric-3-all-different
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ first \
+ "${PARENT} 2" \
+ second \
+ "${TAIL}" \
+ third \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-3-all-identical b/t/symmetric-3-all-identical
new file mode 100755
index 0000000..986d367
--- /dev/null
+++ b/t/symmetric-3-all-identical
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ same \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ same
+
+normal --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-3-different-base b/t/symmetric-3-different-base
new file mode 100755
index 0000000..176c212
--- /dev/null
+++ b/t/symmetric-3-different-base
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ different \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ same
+
+normal --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-3-different-head b/t/symmetric-3-different-head
new file mode 100755
index 0000000..435d828
--- /dev/null
+++ b/t/symmetric-3-different-head
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ different \
+ "${PARENT} 2" \
+ same \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-3-different-tail b/t/symmetric-3-different-tail
new file mode 100755
index 0000000..733c7d3
--- /dev/null
+++ b/t/symmetric-3-different-tail
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ same \
+ "${TAIL}" \
+ different \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-3-empty-head b/t/symmetric-3-empty-head
new file mode 100755
index 0000000..af61802
--- /dev/null
+++ b/t/symmetric-3-empty-head
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ "${PARENT} 2" \
+ 2 \
+ "${TAIL}" \
+ 2 \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-3-empty-head-tail b/t/symmetric-3-empty-head-tail
new file mode 100755
index 0000000..f93cd84
--- /dev/null
+++ b/t/symmetric-3-empty-head-tail
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ "${PARENT} 2" \
+ base \
+ "${TAIL}" \
+ "${END} theirs"
+
+: > file.expected
+
+normal --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-3-empty-tail b/t/symmetric-3-empty-tail
new file mode 100755
index 0000000..bbd4e7a
--- /dev/null
+++ b/t/symmetric-3-empty-tail
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ 1 \
+ "${PARENT} 2" \
+ 1 \
+ "${TAIL}" \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-4-different-head b/t/symmetric-4-different-head
new file mode 100755
index 0000000..0d4d704
--- /dev/null
+++ b/t/symmetric-4-different-head
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ different \
+ "${PARENT} 2" \
+ same \
+ "${PARENT} 3" \
+ same \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-4-different-lower-middle b/t/symmetric-4-different-lower-middle
new file mode 100755
index 0000000..f8c334e
--- /dev/null
+++ b/t/symmetric-4-different-lower-middle
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ same \
+ "${PARENT} 3" \
+ different \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-4-different-tail b/t/symmetric-4-different-tail
new file mode 100755
index 0000000..1bf80ff
--- /dev/null
+++ b/t/symmetric-4-different-tail
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ same \
+ "${PARENT} 3" \
+ same \
+ "${TAIL}" \
+ different \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-4-different-upper-middle b/t/symmetric-4-different-upper-middle
new file mode 100755
index 0000000..d78a5a2
--- /dev/null
+++ b/t/symmetric-4-different-upper-middle
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ different \
+ "${PARENT} 3" \
+ same \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-4-identical b/t/symmetric-4-identical
new file mode 100755
index 0000000..40c82d7
--- /dev/null
+++ b/t/symmetric-4-identical
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ same \
+ "${PARENT} 3" \
+ same \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ same
+
+normal --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-4-same-different-middles b/t/symmetric-4-same-different-middles
new file mode 100755
index 0000000..9d95e43
--- /dev/null
+++ b/t/symmetric-4-same-different-middles
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ new \
+ new \
+ "${PARENT} 2" \
+ old \
+ old \
+ "${PARENT} 3" \
+ old \
+ old \
+ "${TAIL}" \
+ new \
+ new \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ new \
+ new
+
+normal --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-4-unique-different-middles b/t/symmetric-4-unique-different-middles
new file mode 100755
index 0000000..1b76187
--- /dev/null
+++ b/t/symmetric-4-unique-different-middles
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ common \
+ first \
+ common \
+ "${PARENT} 3" \
+ common \
+ second \
+ common \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-5-different-lower-middle b/t/symmetric-5-different-lower-middle
new file mode 100755
index 0000000..530ea01
--- /dev/null
+++ b/t/symmetric-5-different-lower-middle
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ same \
+ "${PARENT} 3" \
+ same \
+ "${PARENT} 4" \
+ different \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-5-different-upper-middle b/t/symmetric-5-different-upper-middle
new file mode 100755
index 0000000..b2fe2dd
--- /dev/null
+++ b/t/symmetric-5-different-upper-middle
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} 2" \
+ different \
+ "${PARENT} 3" \
+ add \
+ "${PARENT} 4" \
+ add \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+cp -- file file.expected
+
+conflict --symmetric --no-reduce file
+
+also_interactive y
diff --git a/t/symmetric-multiple-conflicts b/t/symmetric-multiple-conflicts
new file mode 100755
index 0000000..713a96c
--- /dev/null
+++ b/t/symmetric-multiple-conflicts
@@ -0,0 +1,42 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ before \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} base" \
+ different-interior \
+ "${TAIL}" \
+ same \
+ "${END} theirs" \
+ between \
+ "${HEAD} ours" \
+ different-head \
+ "${PARENT} base" \
+ interior \
+ "${PARENT} other" \
+ interior \
+ "${TAIL}" \
+ same \
+ "${END} theirs" \
+ after
+
+printf '%s\n' > file.expected \
+ before \
+ same \
+ between \
+ "${HEAD} ours" \
+ different-head \
+ "${PARENT} base" \
+ interior \
+ "${PARENT} other" \
+ interior \
+ "${TAIL}" \
+ same \
+ "${END} theirs" \
+ after
+
+conflict --symmetric --no-reduce file
+
+also_interactive yy
diff --git a/t/symmetric-multiple-files b/t/symmetric-multiple-files
new file mode 100755
index 0000000..86d2235
--- /dev/null
+++ b/t/symmetric-multiple-files
@@ -0,0 +1,29 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > first \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} base" \
+ different \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+printf '%s\n' > first.expected \
+ same
+
+printf '%s\n' > second \
+ "${HEAD} ours" \
+ different \
+ "${PARENT} base" \
+ interior \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+cp -- second second.expected
+
+conflict --symmetric --no-reduce first second
+
+also_interactive yy
diff --git a/t/symmetric-no-conflicts b/t/symmetric-no-conflicts
new file mode 100755
index 0000000..d7c8c7f
--- /dev/null
+++ b/t/symmetric-no-conflicts
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ no conflicts in this file
+
+cp -- file file.expected
+
+normal --symmetric --no-reduce file
+
+also_interactive ''
diff --git a/t/symmetric-short-option b/t/symmetric-short-option
new file mode 100755
index 0000000..66c257a
--- /dev/null
+++ b/t/symmetric-short-option
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ same \
+ "${PARENT} base" \
+ different \
+ "${TAIL}" \
+ same \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ same
+
+normal -y --no-reduce file
+
+also_interactive y