Bram Moolenaar | 2a5868a | 2014-08-16 19:45:02 +0200 | [diff] [blame] | 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 |
Bram Moolenaar | 641e48c | 2015-06-25 16:09:26 +0200 | [diff] [blame^] | 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 |
Bram Moolenaar | 2a5868a | 2014-08-16 19:45:02 +0200 | [diff] [blame] | 20 | :call garbagecollect(1) |
| 21 | :/^start:/,$wq! test.out |
| 22 | ENDTEST |
| 23 | |
| 24 | start: |