7
|
1 Tests for regexp with multi-byte encoding and various magic settings.
|
19
|
2 Test matchstr() with a count and multi-byte chars.
|
7
|
3
|
|
4 STARTTEST
|
|
5 :so mbyte.vim
|
|
6 :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo
|
|
7 /^1
|
|
8 /a*b\{2}c\+/e
|
|
9 x/\Md\*e\{2}f\+/e
|
|
10 x:set nomagic
|
|
11 /g\*h\{2}i\+/e
|
|
12 x/\mj*k\{2}l\+/e
|
|
13 x/\vm*n{2}o+/e
|
|
14 x/\V^aa$
|
|
15 x:set magic
|
|
16 /\v(a)(b)\2\1\1/e
|
|
17 x/\V[ab]\(\[xy]\)\1
|
|
18 x:" Now search for multi-byte without composing char
|
|
19 /ม
|
|
20 x:" Now search for multi-byte with composing char
|
|
21 /ม่
|
|
22 x:" find word by change of word class
|
|
23 /ち\<カヨ\>は
|
24
|
24 x:" Test \%u, [\u] and friends
|
|
25 /\%u20ac
|
|
26 x/[\u4f7f\u5929]\+
|
|
27 x/\%U12345678
|
|
28 x/[\U1234abcd\u1234\uabcd]
|
|
29 x/\%d21879b
|
2974
|
30 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
|
|
31 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
|
32 x:" Test backwards search from a multi-byte char
|
|
33 /x
|
|
34 x?.
|
4356
|
35 x:let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g'
|
|
36 :@w
|
|
37 :?^1?,$w! test.out
|
19
|
38 :e! test.out
|
|
39 G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב
|
|
40 :put =matchstr(\"אבגד\", \"..\", 0, 2) " בג
|
|
41 :put =matchstr(\"אבגד\", \".\", 0, 0) " א
|
|
42 :put =matchstr(\"אבגד\", \".\", 4, -1) " ג
|
|
43 :w!
|
7
|
44 :qa!
|
|
45 ENDTEST
|
|
46
|
|
47 1 a aa abb abbccc
|
|
48 2 d dd dee deefff
|
|
49 3 g gg ghh ghhiii
|
|
50 4 j jj jkk jkklll
|
|
51 5 m mm mnn mnnooo
|
|
52 6 x ^aa$ x
|
|
53 7 (a)(b) abbaa
|
|
54 8 axx [ab]xx
|
|
55 9 หม่x อมx
|
|
56 a อมx หม่x
|
|
57 b ちカヨは
|
24
|
58 c x ¬€x
|
|
59 d 天使x
|
|
60 e y
|
|
61 f z
|
|
62 g a啷bb
|
2974
|
63 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ŹŻŽƵẐẔ
|
|
64 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
|
65 j 0123❤x
|
4356
|
66 k combinations
|