comparison src/testdir/test75.in @ 5718:f5120cbf16b9 v7.4.204

updated for version 7.4.204 Problem: A mapping where the second byte is 0x80 doesn't work. Solution: Unescape before checking for incomplete multi-byte char. (Nobuhiro Takasaki)
author Bram Moolenaar <bram@vim.org>
date Wed, 12 Mar 2014 20:17:51 +0100
parents 733193bf24c3
children dd3dac42cb9b
comparison
equal deleted inserted replaced
5717:0cc52481bfd4 5718:f5120cbf16b9
1 Tests for maparg(). 1 Tests for maparg().
2 Also test utf8 map with a 0x80 byte.
2 3
3 STARTTEST 4 STARTTEST
4 :so small.vim 5 :so small.vim
6 :so mbyte.vim
5 :set cpo-=< 7 :set cpo-=<
8 :set encoding=utf8
6 :" Test maparg() with a string result 9 :" Test maparg() with a string result
7 :map foo<C-V> is<F4>foo 10 :map foo<C-V> is<F4>foo
8 :vnoremap <script> <buffer> <expr> <silent> bar isbar 11 :vnoremap <script> <buffer> <expr> <silent> bar isbar
9 :call append('$', maparg('foo<C-V>')) 12 :call append('$', maparg('foo<C-V>'))
10 :call append('$', string(maparg('foo<C-V>', '', 0, 1))) 13 :call append('$', string(maparg('foo<C-V>', '', 0, 1)))
15 :map abc x<char-114>x 18 :map abc x<char-114>x
16 :call append('$', maparg('abc')) 19 :call append('$', maparg('abc'))
17 :map abc y<S-char-114>y 20 :map abc y<S-char-114>y
18 :call append('$', maparg('abc')) 21 :call append('$', maparg('abc'))
19 :" 22 :"
23 Go:"
24 :" Outside of the range, minimum
25 :inoremap <Char-0x1040> a
26 :call feedkeys("a\u1040\<Esc>")
27 :" Inside of the range, minimum
28 :inoremap <Char-0x103f> b
29 :call feedkeys("a\u103f\<Esc>")
30 :" Inside of the range, maximum
31 :inoremap <Char-0xf03f> c
32 :call feedkeys("a\uf03f\<Esc>")
33 :" Outside of the range, maximum
34 :inoremap <Char-0xf040> d
35 :call feedkeys("a\uf040\<Esc>")
36 :"
20 :/^eof/+1,$w! test.out 37 :/^eof/+1,$w! test.out
21 :qa! 38 :qa!
22 ENDTEST 39 ENDTEST
23 40
24 eof 41 eof