aboutsummaryrefslogtreecommitdiffstats
path: root/t/interactive-help
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xt/interactive-help28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/interactive-help b/t/interactive-help
new file mode 100755
index 0000000..398d9dc
--- /dev/null
+++ b/t/interactive-help
@@ -0,0 +1,28 @@
+#!/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_help 2
+ interactive_prompt 1 1
+) > output.expected
+
+printf '%s' '?h' > input
+normal --interactive file 8<input 9>output
+diff -u -- output.expected output >&2