blob: 7e1edaa55cf430502674d1f798d488d35791494d (
plain)
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
29
|
# Interactive: the built-in editor in vi mode.
command -v python3 >/dev/null 2>&1 || exit 77
PS1='$ ' ENV='' HISTFILE='' python3 "$TESTS/tools/ptydrive.py" "$TSH" -o vi <<'END'
send echo hello world\x1b0wcwBYE\x1b\r
expect BYE world
send \x1bk\r
expect BYE world
send echo one two three\x1bbbdw\r
expect one three
send echo one two three\x1b0wD\r
send echo abc\x1b0wiX\x1bA!\x1bIecho \x1b\r
expect echo Xabc!
send echo 12345\x1bhhhx2xrQ\r
expect 1Q
send echo a b\x1b0wyw$p\r
expect a ba
send echo undo me\x1bddu\r
expect undo me
send echo upper\x1b0w5~\r
expect UPPER
send echo x\x1b/BYE\r\r
expect BYE world
send echo count\x1b03lx\r
expect ech count
send echo comment\x1b#
send echo done\r
expect done
send exit\r
END
|