1Tests for regexp with multi-byte encoding and various magic settings.
2Test matchstr() with a count and multi-byte chars.
3
4STARTTEST
5:so mbyte.vim
6:set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo
7/^1
8/a*b\{2}c\+/e
9x/\Md\*e\{2}f\+/e
10x:set nomagic
11/g\*h\{2}i\+/e
12x/\mj*k\{2}l\+/e
13x/\vm*n{2}o+/e
14x/\V^aa$
15x:set magic
16/\v(a)(b)\2\1\1/e
17x/\V[ab]\(\[xy]\)\1
18x:" Now search for multi-byte without composing char
19/ม
20x:" Now search for multi-byte with composing char
21/ม่
22x:" find word by change of word class
23/ち\<カヨ\>は
24x:" Test \%u, [\u] and friends
25/\%u20ac
26x/[\u4f7f\u5929]\+
27x/\%U12345678
28x/[\U1234abcd\u1234\uabcd]
29x/\%d21879b
30x:?^1?,$w! test.out
31:e! test.out
32G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב
33:put =matchstr(\"אבגד\", \"..\", 0, 2) " בג
34:put =matchstr(\"אבגד\", \".\", 0, 0) " א
35:put =matchstr(\"אבגד\", \".\", 4, -1) " ג
36:w!
37:qa!
38ENDTEST
39
401 a aa abb abbccc
412 d dd dee deefff
423 g gg ghh ghhiii
434 j jj jkk jkklll
445 m mm mnn mnnooo
456 x ^aa$ x
467 (a)(b) abbaa
478 axx [ab]xx
489 หม่x อมx
49a อมx หม่x
50b ちカヨは
51c x ¬€x
52d 天使x
53e �y
54f �z
55g a啷bb
56