comparison src/testdir/test_utf8.in @ 7248:dc7b1567d057 v7.4.932

commit https://github.com/vim/vim/commit/8f08dab18df6dbf6c4b4973fd2d480e4bffb82d8 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 21 14:31:33 2015 +0100 patch 7.4.932 Problem: test_utf8 has confusing dummy command. Solution: Use a real command instead of a colon.
author Christian Brabandt <cb@256bit.org>
date Sat, 21 Nov 2015 14:45:04 +0100
parents e45271250496
children b4b7b06c7951
comparison
equal deleted inserted replaced
7247:d8ef946551ac 7248:dc7b1567d057
1 Tests for Unicode manipulations vim: set ft=vim : 1 Tests for Unicode manipulations vim: set ft=vim :
2 2
3 STARTTEST 3 STARTTEST
4 :so small.vim 4 :so small.vim
5 :set encoding=utf-8 5 :set encoding=utf-8
6 :"
6 :" Visual block Insert adjusts for multi-byte char 7 :" Visual block Insert adjusts for multi-byte char
7 :new 8 :new
8 :call setline(1, ["aaa", "あああ", "bbb"]) 9 :call setline(1, ["aaa", "あああ", "bbb"])
9 :exe ":norm! gg0l\<C-V>jjIx\<Esc>" 10 :exe ":norm! gg0l\<C-V>jjIx\<Esc>"
10 :let r = getline(1, '$') 11 :let r = getline(1, '$')
11 : 12 :
12 :bwipeout! 13 :bwipeout!
13 :$put=r 14 :$put=r
15 :"
14 :" Test for built-in function strchars() 16 :" Test for built-in function strchars()
15 :for str in ["a", "あいa", "A\u20dd", "A\u20dd\u20dd", "\u20dd"] 17 :for str in ["a", "あいa", "A\u20dd", "A\u20dd\u20dd", "\u20dd"]
16 : $put=strchars(str) 18 : $put=strchars(str)
17 : $put=strchars(str, 0) 19 : $put=strchars(str, 0)
18 : $put=strchars(str, 1) 20 : $put=strchars(str, 1)
19 :endfor 21 :endfor
22 :"
20 :" Test for customlist completion 23 :" Test for customlist completion
21 :function! CustomComplete1(lead, line, pos) 24 :function! CustomComplete1(lead, line, pos)
22 : return ['あ', 'い'] 25 : return ['あ', 'い']
23 :endfunction 26 :endfunction
24 :command -nargs=1 -complete=customlist,CustomComplete1 Test1 : 27 :command -nargs=1 -complete=customlist,CustomComplete1 Test1 echo
25 :call feedkeys(":Test1 \<C-L>'\<C-B>$put='\<CR>", 't') 28 :call feedkeys(":Test1 \<C-L>'\<C-B>$put='\<CR>", 't')
26 : 29 :
27 :function! CustomComplete2(lead, line, pos) 30 :function! CustomComplete2(lead, line, pos)
28 : return ['あたし', 'あたま', 'あたりめ'] 31 : return ['あたし', 'あたま', 'あたりめ']
29 :endfunction 32 :endfunction
30 :command -nargs=1 -complete=customlist,CustomComplete2 Test2 : 33 :command -nargs=1 -complete=customlist,CustomComplete2 Test2 echo
31 :call feedkeys(":Test2 \<C-L>'\<C-B>$put='\<CR>", 't') 34 :call feedkeys(":Test2 \<C-L>'\<C-B>$put='\<CR>", 't')
32 : 35 :
33 :function! CustomComplete3(lead, line, pos) 36 :function! CustomComplete3(lead, line, pos)
34 : return ['Nこ', 'Nん', 'Nぶ'] 37 : return ['Nこ', 'Nん', 'Nぶ']
35 :endfunction 38 :endfunction
36 :command -nargs=1 -complete=customlist,CustomComplete3 Test3 : 39 :command -nargs=1 -complete=customlist,CustomComplete3 Test3 echo
37 :call feedkeys(":Test3 \<C-L>'\<C-B>$put='\<CR>", 't') 40 :call feedkeys(":Test3 \<C-L>'\<C-B>$put='\<CR>", 't')
38 : 41 :
39 :call garbagecollect(1) 42 :call garbagecollect(1)
40 :/^start:/,$wq! test.out 43 :/^start:/,$wq! test.out
41 ENDTEST 44 ENDTEST