aboutsummaryrefslogtreecommitdiffstats
path: root/t/select-head-3
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-09-22 19:53:29 +0200
committerMattias Andrée <m@maandree.se>2026-09-22 19:53:29 +0200
commitd8de1b23e8ec896759424a2f146969783cdd89e3 (patch)
treeed1ea3e97add5116230fd2df34e42b829a70ab39 /t/select-head-3
parentfix doc text (diff)
downloadgit-rediff-master.tar.gz
git-rediff-master.tar.bz2
git-rediff-master.tar.xz
Add conflcit resultions strategies and interactive mode, and a lot of testsHEAD1.1master
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rwxr-xr-xt/select-head-318
-rwxr-xr-xt/select-head-3-empty-base17
-rwxr-xr-xt/select-head-3-empty-head16
-rwxr-xr-xt/select-head-3-empty-tail17
4 files changed, 68 insertions, 0 deletions
diff --git a/t/select-head-3 b/t/select-head-3
new file mode 100755
index 0000000..98e5b63
--- /dev/null
+++ b/t/select-head-3
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ ours \
+ "${PARENT} base" \
+ base \
+ "${TAIL}" \
+ theirs \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ ours
+
+normal --select-head --no-reduce file
+
+also_interactive h
diff --git a/t/select-head-3-empty-base b/t/select-head-3-empty-base
new file mode 100755
index 0000000..0bfa110
--- /dev/null
+++ b/t/select-head-3-empty-base
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD}" \
+ ours \
+ "${PARENT}" \
+ "${TAIL}" \
+ theirs \
+ "${END}"
+
+printf '%s\n' > file.expected \
+ ours
+
+normal --select-head --no-reduce file
+
+also_interactive h
diff --git a/t/select-head-3-empty-head b/t/select-head-3-empty-head
new file mode 100755
index 0000000..f1ebd7c
--- /dev/null
+++ b/t/select-head-3-empty-head
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ "${PARENT} base" \
+ base \
+ "${TAIL} theirs" \
+ theirs \
+ "${END} end of conflict"
+
+: > file.expected
+
+normal --select-head --no-reduce file
+
+also_interactive h
diff --git a/t/select-head-3-empty-tail b/t/select-head-3-empty-tail
new file mode 100755
index 0000000..8041a15
--- /dev/null
+++ b/t/select-head-3-empty-tail
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+. t/common.sh
+
+printf '%s\n' > file \
+ "${HEAD} o" \
+ ours \
+ "${PARENT} b" \
+ base \
+ "${TAIL}" \
+ "${END} t"
+
+printf '%s\n' > file.expected \
+ ours
+
+normal --select-head --no-reduce file
+
+also_interactive h