diff options
Diffstat (limited to 'Test/X03zlebindkey.ztst')
-rw-r--r-- | Test/X03zlebindkey.ztst | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/Test/X03zlebindkey.ztst b/Test/X03zlebindkey.ztst index 43692a85b..1b63b3920 100644 --- a/Test/X03zlebindkey.ztst +++ b/Test/X03zlebindkey.ztst @@ -3,16 +3,7 @@ # into bindings. The latter is particularly tricky with multibyte sequences. %prep - unset -m LC_\* - 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 + ZSH_TEST_LANG=$(ZTST_find_UTF8) if ( zmodload zsh/zpty 2>/dev/null ); then . $ZTST_srcdir/comptest comptestinit -z $ZTST_testdir/../Src/zsh @@ -46,6 +37,28 @@ >"^Xy" "bar" >"^Xy" undefined-key + zpty_run 'bindkey -s "\e[" altbracket' + zletest $'$\C-A\e[17~' + zpty_run 'bindkey -r "\e["' +0:binding to CSI introduction is not used if a full sequence arrives +>BUFFER: $ +>CURSOR: 0 + + zpty_run 'bindkey -s "\e[1" altbracketone' + zletest $'$\C-A\e[17~' + zpty_run 'bindkey -r "\e[1"' +0:binding to longer prefix of a CSI sequence is used +# we assume the user knows what they're doing +>BUFFER: altbracketone7~$ +>CURSOR: 15 + + zpty_run 'bindkey -s "\e[" altbracket' + zletest $'$\C-A\e[177' + zpty_run 'bindkey -r "\e["' +0:use prefix binding where we don't have a CSI sequence +>BUFFER: altbracket177$ +>CURSOR: 13 + # As we're only looking at definitions here, we don't # bother using the pseudo-terminal; just test in the normal fashion. bindkey -e |