annotate src/testdir/test_utf8.in @ 7062:6deb9d802fe4 v7.4.843

commit https://github.com/vim/vim/commit/d43f0951bca162d4491d57df9277b5dbc462944f Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 27 22:30:47 2015 +0200 patch 7.4.843 Problem: Still possible to go beyond the end of a string. Solution: Check for NUL also in second string. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Thu, 27 Aug 2015 22:45:03 +0200
parents 66ab6ec256d1
children e45271250496
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
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :" Visual block Insert adjusts for multi-byte char
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :new
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :call setline(1, ["aaa", "あああ", "bbb"])
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 :exe ":norm! gg0l\<C-V>jjIx\<Esc>"
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 :let r = getline(1, '$')
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 :
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 :bwipeout!
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :$put=r
6870
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
14 :" Test for built-in function strchars()
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
15 :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
16 : $put=strchars(str)
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
17 : $put=strchars(str, 0)
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
18 : $put=strchars(str, 1)
66ab6ec256d1 patch 7.4.755
Bram Moolenaar <bram@vim.org>
parents: 6142
diff changeset
19 :endfor
6142
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 :call garbagecollect(1)
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :/^start:/,$wq! test.out
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 ENDTEST
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23
4c08173b8b95 Add files missing from 7.4.408.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 start: