From d8de1b23e8ec896759424a2f146969783cdd89e3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 22 Sep 2026 19:53:29 +0200 Subject: Add conflcit resultions strategies and interactive mode, and a lot of tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- t/interactive-short-option | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 t/interactive-short-option (limited to 't/interactive-short-option') diff --git a/t/interactive-short-option b/t/interactive-short-option new file mode 100755 index 0000000..904f7e2 --- /dev/null +++ b/t/interactive-short-option @@ -0,0 +1,46 @@ +#!/bin/sh -e +. t/common.sh +interactive + +printf '%s\n' > file \ + "${HEAD} ours" \ + ours-1 \ + "${PARENT} base" \ + base-1 \ + "${TAIL}" \ + theirs-1 \ + "${END} theirs" \ + "${HEAD} ours" \ + ours-2 \ + "${PARENT} base" \ + base-2 \ + "${TAIL}" \ + theirs-2 \ + "${END} theirs" + +printf '%s\n' > file.expected \ + theirs-1 \ + ours-2 + +( + interactive_marker "${HEAD} ours" + interactive_side ours-1 + interactive_marker "${PARENT} base" + interactive_base base-1 + interactive_marker "${TAIL}" + interactive_side theirs-1 + interactive_marker "${END} theirs" + interactive_prompt 1 2 + interactive_marker "${HEAD} ours" + interactive_side ours-2 + interactive_marker "${PARENT} base" + interactive_base base-2 + interactive_marker "${TAIL}" + interactive_side theirs-2 + interactive_marker "${END} theirs" + interactive_prompt 2 2 +) > output.expected + +printf '%s' th > input +normal -i file 8output +diff -u -- output.expected output >&2 -- cgit v1.3.1