annotate src/testdir/test99.in @ 9898:bff8a09016a5 v7.4.2223

commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 17 21:32:09 2016 +0200 patch 7.4.2223 Problem: Buffer overflow when using latin1 character with feedkeys(). Solution: Check for an illegal character. Add a test.
author Christian Brabandt <cb@256bit.org>
date Wed, 17 Aug 2016 21:45:07 +0200
parents c154fbd3004f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5355
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Tests for regexp with multi-byte encoding and various magic settings.
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 Test matchstr() with a count and multi-byte chars.
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 See test44 for exactly the same test with re=1.
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 STARTTEST
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :so mbyte.vim
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :set re=2
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 /^1
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 /a*b\{2}c\+/e
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 x/\Md\*e\{2}f\+/e
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 x:set nomagic
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 /g\*h\{2}i\+/e
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 x/\mj*k\{2}l\+/e
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 x/\vm*n{2}o+/e
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 x/\V^aa$
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 x:set magic
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 /\v(a)(b)\2\1\1/e
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 x/\V[ab]\(\[xy]\)\1
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 x:" Now search for multi-byte without composing char
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 /ม
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 x:" Now search for multi-byte with composing char
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 /ม่
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 x:" find word by change of word class
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 /ち\<カヨ\>は
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 x:" Test \%u, [\u] and friends
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 /\%u20ac
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 x/[\u4f7f\u5929]\+
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 x/\%U12345678
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 x/[\U1234abcd\u1234\uabcd]
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 x/\%d21879b
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 x:" Test backwards search from a multi-byte char
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 /x
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 x?.
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 x:let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g'
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :@w
7404
fb61ce5915fc commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents: 5355
diff changeset
37 :"
fb61ce5915fc commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents: 5355
diff changeset
38 :" l Test what 7.3.192 fixed
fb61ce5915fc commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents: 5355
diff changeset
39 /^l
fb61ce5915fc commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents: 5355
diff changeset
40 :s/ \?/ /g
5355
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 :?^1?,$w! test.out
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 :e! test.out
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 :put =matchstr(\"אבגד\", \"..\", 0, 2) " בג
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 :put =matchstr(\"אבגד\", \".\", 0, 0) " א
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 :put =matchstr(\"אבגד\", \".\", 4, -1) " ג
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 :w!
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 :qa!
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 ENDTEST
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 1 a aa abb abbccc
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 2 d dd dee deefff
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 3 g gg ghh ghhiii
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 4 j jj jkk jkklll
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 5 m mm mnn mnnooo
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 6 x ^aa$ x
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 7 (a)(b) abbaa
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 8 axx [ab]xx
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 9 หม่x อมx
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 a อมx หม่x
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 b ちカヨは
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 c x ¬€x
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 d 天使x
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 e y
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 f z
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 g a啷bb
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 j 0123❤x
5a05fecfb2ad Add files missing from 7.4.028.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 k combinations
7404
fb61ce5915fc commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents: 5355
diff changeset
69 l äö üᾱ̆́