view src/testdir/test_utf8.in @ 6999:dc1b678f0e4e v7.4.817

patch 7.4.817 Problem: Invalid memory access in file_pat_to_reg_pat(). Solution: Use vim_isspace() instead of checking for a space only. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Tue, 11 Aug 2015 16:20:05 +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: