7
|
1 Tests for regexp with multi-byte encoding and various magic settings.
|
19
|
2 Test matchstr() with a count and multi-byte chars.
|
5351
|
3 See test99 for exactly the same test with re=2.
|
7
|
4
|
|
5 STARTTEST
|
|
6 :so mbyte.vim
|
|
7 :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo
|
5351
|
8 :set re=1
|
7
|
9 /^1
|
|
10 /a*b\{2}c\+/e
|
|
11 x/\Md\*e\{2}f\+/e
|
|
12 x:set nomagic
|
|
13 /g\*h\{2}i\+/e
|
|
14 x/\mj*k\{2}l\+/e
|
|
15 x/\vm*n{2}o+/e
|
|
16 x/\V^aa$
|
|
17 x:set magic
|
|
18 /\v(a)(b)\2\1\1/e
|
|
19 x/\V[ab]\(\[xy]\)\1
|
|
20 x:" Now search for multi-byte without composing char
|
|
21 /ม
|
|
22 x:" Now search for multi-byte with composing char
|
|
23 /ม่
|
|
24 x:" find word by change of word class
|
|
25 /ち\<カヨ\>は
|
24
|
26 x:" Test \%u, [\u] and friends
|
|
27 /\%u20ac
|
|
28 x/[\u4f7f\u5929]\+
|
|
29 x/\%U12345678
|
|
30 x/[\U1234abcd\u1234\uabcd]
|
|
31 x/\%d21879b
|
2974
|
32 x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e
|
|
33 x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e
|
4049
|
34 x:" Test backwards search from a multi-byte char
|
|
35 /x
|
|
36 x?.
|
4356
|
37 x:let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g'
|
|
38 :@w
|
|
39 :?^1?,$w! test.out
|
19
|
40 :e! test.out
|
|
41 G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב
|
|
42 :put =matchstr(\"אבגד\", \"..\", 0, 2) " בג
|
|
43 :put =matchstr(\"אבגד\", \".\", 0, 0) " א
|
|
44 :put =matchstr(\"אבגד\", \".\", 4, -1) " ג
|
6620
|
45 :new
|
|
46 :$put =['dog(a', 'cat(']
|
|
47 /(/e+
|
|
48 "ayn:bd!
|
|
49 :$put =''
|
|
50 G"ap
|
19
|
51 :w!
|
7
|
52 :qa!
|
|
53 ENDTEST
|
|
54
|
|
55 1 a aa abb abbccc
|
|
56 2 d dd dee deefff
|
|
57 3 g gg ghh ghhiii
|
|
58 4 j jj jkk jkklll
|
|
59 5 m mm mnn mnnooo
|
|
60 6 x ^aa$ x
|
|
61 7 (a)(b) abbaa
|
|
62 8 axx [ab]xx
|
|
63 9 หม่x อมx
|
|
64 a อมx หม่x
|
|
65 b ちカヨは
|
24
|
66 c x ¬€x
|
|
67 d 天使x
|
|
68 e y
|
|
69 f z
|
|
70 g a啷bb
|
2974
|
71 h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ
|
|
72 i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ
|
4049
|
73 j 0123❤x
|
4356
|
74 k combinations
|