zsh-workers
 help / color / mirror / code / Atom feed
e6fead58631d35d5896823138efa8c66cfe0965f blob 1132 bytes (raw)

 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
# Tests of the vi mode of ZLE

%prep
  ZSH_TEST_LANG=
  langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
	 $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
  for LANG in $langs; do
    if [[ é = ? ]]; then
      ZSH_TEST_LANG=$LANG
      break;
    fi
  done
  if [[ $OSTYPE = cygwin ]]; then
    ZTST_unimplemented="the zsh/zpty module does not work on Cygwin"
  elif ( zmodload zsh/zpty 2>/dev/null ); then
    . $ZTST_srcdir/comptest
    comptestinit -z $ZTST_testdir/../Src/zsh
  else
    ZTST_unimplemented="the zsh/zpty module is not available"
  fi

%test

  zpty_run 'bindkey -s "\C-xy" foo'
  zletest $'\C-xy'
  zpty_run 'bindkey -r "\C-xy"'
0:bindkey -s
>BUFFER: foo
>CURSOR: 3

  if [[ -z $ZSH_TEST_LANG ]]; then
    ZTST_skip="bindkey multibyte test skipped"
  else
    zpty_run 'alias unbind="bindkey -r ホ"'
    zpty_run 'bindkey -s ホ bar'
    zletest 'ホ'
    zpty_run unbind
    zletest 'ホ'
    zpty_run 'bindkey ホ self-insert'
    zletest 'ホ'
    zpty_run unbind
    zletest 'ホ'
  fi
0:bindkey -s multibyte characters
>BUFFER: bar
>CURSOR: 3
>BUFFER: ホ
>CURSOR: 1
>BUFFER: ホ
>CURSOR: 1
>BUFFER: ホ
>CURSOR: 1
debug log:

solving e6fead5 ...
found e6fead5 in https://git.vuxu.org/mirror/zsh/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).