6142
|
1 Tests for Unicode manipulations vim: set ft=vim :
|
|
2
|
|
3 STARTTEST
|
|
4 :so small.vim
|
|
5 :set encoding=utf-8
|
|
6 :" Visual block Insert adjusts for multi-byte char
|
|
7 :new
|
|
8 :call setline(1, ["aaa", "あああ", "bbb"])
|
|
9 :exe ":norm! gg0l\<C-V>jjIx\<Esc>"
|
|
10 :let r = getline(1, '$')
|
|
11 :
|
|
12 :bwipeout!
|
|
13 :$put=r
|
6870
|
14 :" Test for built-in function strchars()
|
|
15 :for str in ["a", "あいa", "A\u20dd", "A\u20dd\u20dd", "\u20dd"]
|
|
16 : $put=strchars(str)
|
|
17 : $put=strchars(str, 0)
|
|
18 : $put=strchars(str, 1)
|
|
19 :endfor
|
6142
|
20 :call garbagecollect(1)
|
|
21 :/^start:/,$wq! test.out
|
|
22 ENDTEST
|
|
23
|
|
24 start:
|