File: test_kmap.sh

package info (click to toggle)
mle 1.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,108 kB
  • sloc: ansic: 13,335; sh: 728; php: 228; makefile: 83
file content (22 lines) | stat: -rwxr-xr-x 614 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

# ensure binding in prev kmap works with fallthru enabled
extra_opts=(
    -K 'ka,,1' -k 'cmd_shell,a a,echo -n A' -k 'cmd_push_kmap,x,kb' -k 'cmd_quit_without_saving,f12,'
    -K 'kb,,1' -k 'cmd_shell,a b,echo -n B' -k 'cmd_pop_kmap,x,'
    -n 'ka'
)
macro='a a a b x a b a a x a z'
declare -A expected
expected[data]='^AabBAaz$'
source 'test.sh'

# ensure input trail resets on non-matching input w/ fallthru disabled
extra_opts=(
    -K 'ka,,0' -k 'cmd_shell,a,echo -n A' -k 'cmd_quit_without_saving,f12,'
    -n 'ka'
)
macro='b a'
declare -A expected
expected[data]='^A$'
source 'test.sh'