diff options
| author | Mattias Andrée <m@maandree.se> | 2026-10-10 14:20:03 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-10-10 14:20:03 +0200 |
| commit | b2cb62247abe54ff6063b92d2d74eb4ee76c197d (patch) | |
| tree | 039fafb367772d4be34756d8865f4996541e42da /t | |
| parent | Add support for combining --merge and --symmetric (diff) | |
| download | git-rediff-1.3.1.tar.gz git-rediff-1.3.1.tar.bz2 git-rediff-1.3.1.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 't')
| -rw-r--r-- | t/common.sh | 4 | ||||
| -rwxr-xr-x | t/interactive-redraw | 33 |
2 files changed, 37 insertions, 0 deletions
diff --git a/t/common.sh b/t/common.sh index 38d2845..bb1bd83 100644 --- a/t/common.sh +++ b/t/common.sh @@ -144,6 +144,10 @@ interactive_prompt () { 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_clear_screen () { + printf '\e[H\e[2J' +} + interactive_help () { test $# = 1 printf '\e[1;31m' diff --git a/t/interactive-redraw b/t/interactive-redraw new file mode 100755 index 0000000..71fdca6 --- /dev/null +++ b/t/interactive-redraw @@ -0,0 +1,33 @@ +#!/bin/sh -e +. t/common.sh +interactive + +printf '%s\n' > file \ + "${HEAD} ours" \ + head \ + "${TAIL}" \ + tail \ + "${END} theirs" + +printf '%s\n' > file.expected \ + head + +( + interactive_marker "${HEAD} ours" + interactive_side head + interactive_marker "${TAIL}" + interactive_side tail + interactive_marker "${END} theirs" + interactive_prompt 1 1 + interactive_clear_screen + interactive_marker "${HEAD} ours" + interactive_side head + interactive_marker "${TAIL}" + interactive_side tail + interactive_marker "${END} theirs" + interactive_prompt 1 1 +) > output.expected + +printf '\fh' > input +normal --interactive file 8<input 9>output +diff -u -- output.expected output >&2 |
