aboutsummaryrefslogtreecommitdiffstats
path: root/t/interactive-help
blob: 398d9dcc45b1011f913ef2bb3f0d6bb15de15d52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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