Mercurial > vim
view 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 |
line wrap: on
line source
Tests for Unicode manipulations vim: set ft=vim : STARTTEST :so small.vim :set encoding=utf-8 :" Visual block Insert adjusts for multi-byte char :new :call setline(1, ["aaa", "あああ", "bbb"]) :exe ":norm! gg0l\<C-V>jjIx\<Esc>" :let r = getline(1, '$') : :bwipeout! :$put=r :" Test for built-in function strchars() :for str in ["a", "あいa", "A\u20dd", "A\u20dd\u20dd", "\u20dd"] : $put=strchars(str) : $put=strchars(str, 0) : $put=strchars(str, 1) :endfor :call garbagecollect(1) :/^start:/,$wq! test.out ENDTEST start: