aboutsummaryrefslogtreecommitdiffstats
path: root/t/interactive-two-files
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/interactive-two-files
parentfix doc text (diff)
downloadgit-rediff-1.1.tar.gz
git-rediff-1.1.tar.bz2
git-rediff-1.1.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 't/interactive-two-files')
-rwxr-xr-xt/interactive-two-files44
1 files changed, 44 insertions, 0 deletions
diff --git a/t/interactive-two-files b/t/interactive-two-files
new file mode 100755
index 0000000..c2c3f02
--- /dev/null
+++ b/t/interactive-two-files
@@ -0,0 +1,44 @@
+#!/bin/sh -e
+. t/common.sh
+interactive
+
+printf '%s\n' > file \
+ "${HEAD} ours" \
+ ours-1 \
+ "${TAIL}" \
+ theirs-1 \
+ "${END} theirs"
+
+printf '%s\n' > file.expected \
+ theirs-1
+
+printf '%s\n' > file2 \
+ "${HEAD} ours" \
+ ours-2 \
+ "${TAIL}" \
+ theirs-2 \
+ "${END} theirs"
+
+printf '%s\n' > file2.expected \
+ ours-2
+
+(
+ interactive_filename file
+ interactive_marker "${HEAD} ours"
+ interactive_side ours-1
+ interactive_marker "${TAIL}"
+ interactive_side theirs-1
+ interactive_marker "${END} theirs"
+ interactive_prompt 1 1
+ interactive_filename file2
+ interactive_marker "${HEAD} ours"
+ interactive_side ours-2
+ interactive_marker "${TAIL}"
+ interactive_side theirs-2
+ interactive_marker "${END} theirs"
+ interactive_prompt 1 1
+) > output.expected
+
+printf '%s' th > input
+normal --interactive file file2 8<input 9>output
+diff -u -- output.expected output >&2