File: test_delete.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 (26 lines) | stat: -rwxr-xr-x 739 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env bash

macro='f o o enter b a r backspace backspace backspace backspace'
declare -A expected
expected[bs_line1]='^foo$'
expected[bs_byte_count]='^bview.0.buffer.byte_count=3$'
expected[bs_line_count]='^bview.0.buffer.line_count=1$'
source 'test.sh'
unset expected

macro='f o o b a r left left left delete delete delete'
declare -A expected
expected[del_line1]='^foo$'
expected[del_byte_count]='^bview.0.buffer.byte_count=3$'
expected[del_line_count]='^bview.0.buffer.line_count=1$'
source 'test.sh'

macro='f o o space b a r C-w'
declare -A expected
expected[delete_word_back_data]='^foo $'
source 'test.sh'

macro='f o o space b a r C-a M-d'
declare -A expected
expected[delete_word_forward_data]='^ bar$'
source 'test.sh'