annotate src/testdir/test_utf8.in @ 9019:2e3c6071db97 v7.4.1795

commit https://github.com/vim/vim/commit/5487544fa5d46af9f8f98aa4f5c59074a6e0639a Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 26 22:33:17 2016 +0200 patch 7.4.1795 Problem: Compiler warning for redefining RGB. (John Marriott) Solution: Rename it to TORGB.
author Christian Brabandt <cb@256bit.org>
date Tue, 26 Apr 2016 22:45:07 +0200
parents b4b7b06c7951
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6142
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Tests for Unicode manipulations vim: set ft=vim :
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :so small.vim
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :set encoding=utf-8
7248
dc7b1567d057 commit https://github.com/vim/vim/commit/8f08dab18df6dbf6c4b4973fd2d480e4bffb82d8
Christian Brabandt <cb@256bit.org>
parents: 7235
diff changeset
6 :"
6142
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :" Visual block Insert adjusts for multi-byte char
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :new
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 :call setline(1, ["aaa", "あああ", "bbb"])
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 :exe ":norm! gg0l\<C-V>jjIx\<Esc>"
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 :let r = getline(1, '$')
7254
b4b7b06c7951 commit https://github.com/vim/vim/commit/6040256d8b0404564ac6f192296b12ea9d175e7d
Christian Brabandt <cb@256bit.org>
parents: 7248
diff changeset
12 :"
6142
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :bwipeout!
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :$put=r
7248
dc7b1567d057 commit https://github.com/vim/vim/commit/8f08dab18df6dbf6c4b4973fd2d480e4bffb82d8
Christian Brabandt <cb@256bit.org>
parents: 7235
diff changeset
15 :"
6870
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
16 :" Test for built-in function strchars()
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
17 :for str in ["a", "あいa", "A\u20dd", "A\u20dd\u20dd", "\u20dd"]
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
18 : $put=strchars(str)
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
19 : $put=strchars(str, 0)
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
20 : $put=strchars(str, 1)
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
21 :endfor
7248
dc7b1567d057 commit https://github.com/vim/vim/commit/8f08dab18df6dbf6c4b4973fd2d480e4bffb82d8
Christian Brabandt <cb@256bit.org>
parents: 7235
diff changeset
22 :"
7235
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
23 :" Test for customlist completion
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
24 :function! CustomComplete1(lead, line, pos)
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
25 : return ['あ', 'い']
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
26 :endfunction
7248
dc7b1567d057 commit https://github.com/vim/vim/commit/8f08dab18df6dbf6c4b4973fd2d480e4bffb82d8
Christian Brabandt <cb@256bit.org>
parents: 7235
diff changeset
27 :command -nargs=1 -complete=customlist,CustomComplete1 Test1 echo
7254
b4b7b06c7951 commit https://github.com/vim/vim/commit/6040256d8b0404564ac6f192296b12ea9d175e7d
Christian Brabandt <cb@256bit.org>
parents: 7248
diff changeset
28 :call feedkeys(":Test1 \<C-L>'\<C-B>$put='\<CR>", 'it')
b4b7b06c7951 commit https://github.com/vim/vim/commit/6040256d8b0404564ac6f192296b12ea9d175e7d
Christian Brabandt <cb@256bit.org>
parents: 7248
diff changeset
29 :"
7235
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
30 :function! CustomComplete2(lead, line, pos)
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
31 : return ['あたし', 'あたま', 'あたりめ']
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
32 :endfunction
7248
dc7b1567d057 commit https://github.com/vim/vim/commit/8f08dab18df6dbf6c4b4973fd2d480e4bffb82d8
Christian Brabandt <cb@256bit.org>
parents: 7235
diff changeset
33 :command -nargs=1 -complete=customlist,CustomComplete2 Test2 echo
7254
b4b7b06c7951 commit https://github.com/vim/vim/commit/6040256d8b0404564ac6f192296b12ea9d175e7d
Christian Brabandt <cb@256bit.org>
parents: 7248
diff changeset
34 :call feedkeys(":Test2 \<C-L>'\<C-B>$put='\<CR>", 'it')
b4b7b06c7951 commit https://github.com/vim/vim/commit/6040256d8b0404564ac6f192296b12ea9d175e7d
Christian Brabandt <cb@256bit.org>
parents: 7248
diff changeset
35 :"
7235
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
36 :function! CustomComplete3(lead, line, pos)
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
37 : return ['Nこ', 'Nん', 'Nぶ']
e45271250496 commit https://github.com/vim/vim/commit/4f8fa1633cdfbd09a41160c8480fe67c198067e9
Christian Brabandt <cb@256bit.org>
parents: 6870
diff changeset
38 :endfunction
7248
dc7b1567d057 commit https://github.com/vim/vim/commit/8f08dab18df6dbf6c4b4973fd2d480e4bffb82d8
Christian Brabandt <cb@256bit.org>
parents: 7235
diff changeset
39 :command -nargs=1 -complete=customlist,CustomComplete3 Test3 echo
7254
b4b7b06c7951 commit https://github.com/vim/vim/commit/6040256d8b0404564ac6f192296b12ea9d175e7d
Christian Brabandt <cb@256bit.org>
parents: 7248
diff changeset
40 :call feedkeys(":Test3 \<C-L>'\<C-B>$put='\<CR>", 'it')
b4b7b06c7951 commit https://github.com/vim/vim/commit/6040256d8b0404564ac6f192296b12ea9d175e7d
Christian Brabandt <cb@256bit.org>
parents: 7248
diff changeset
41 :"
6142
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 :call garbagecollect(1)
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 :/^start:/,$wq! test.out
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 ENDTEST
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 start: