Mercurial > vim
annotate src/testdir/test44.in @ 7404:fb61ce5915fc v7.4.1006
commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 31 16:21:52 2015 +0100
patch 7.4.1006
Problem: The fix in patch 7.3.192 is not tested.
Solution: Add a test, one for each regexp engine. (Elias Diem)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 31 Dec 2015 16:30:04 +0100 |
parents | ec46a5ca1b51 |
children | c154fbd3004f |
rev | line source |
---|---|
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 |
6765 | 27 :" c |
24 | 28 /\%u20ac |
6765 | 29 x:" d |
30 /[\u4f7f\u5929]\+ | |
31 x:" e | |
32 /\%U12345678 | |
33 x:" f | |
34 /[\U1234abcd\u1234\uabcd] | |
35 x:" g | |
36 /\%d21879b | |
37 x:" h | |
38 / [[=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 | |
39 x:" i | |
40 / [[=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 | |
41 x:" j Test backwards search from a multi-byte char | |
4049 | 42 /x |
43 x?. | |
6765 | 44 x:" k |
45 :let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g' | |
4356 | 46 :@w |
7404
fb61ce5915fc
commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents:
6765
diff
changeset
|
47 :" |
fb61ce5915fc
commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents:
6765
diff
changeset
|
48 :" l Test what 7.3.192 fixed |
fb61ce5915fc
commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents:
6765
diff
changeset
|
49 /^l |
fb61ce5915fc
commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents:
6765
diff
changeset
|
50 :s/ \?/ /g |
4356 | 51 :?^1?,$w! test.out |
19 | 52 :e! test.out |
53 G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב | |
54 :put =matchstr(\"אבגד\", \"..\", 0, 2) " בג | |
55 :put =matchstr(\"אבגד\", \".\", 0, 0) " א | |
56 :put =matchstr(\"אבגד\", \".\", 4, -1) " ג | |
6620 | 57 :new |
58 :$put =['dog(a', 'cat('] | |
59 /(/e+ | |
60 "ayn:bd! | |
61 :$put ='' | |
62 G"ap | |
19 | 63 :w! |
7 | 64 :qa! |
65 ENDTEST | |
66 | |
67 1 a aa abb abbccc | |
68 2 d dd dee deefff | |
69 3 g gg ghh ghhiii | |
70 4 j jj jkk jkklll | |
71 5 m mm mnn mnnooo | |
72 6 x ^aa$ x | |
73 7 (a)(b) abbaa | |
74 8 axx [ab]xx | |
75 9 หม่x อมx | |
76 a อมx หม่x | |
77 b ちカヨは | |
24 | 78 c x ¬€x |
79 d 天使x | |
80 e y | |
81 f z | |
82 g a啷bb | |
2974 | 83 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ŹŻŽƵẐẔ |
84 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 | 85 j 0123❤x |
4356 | 86 k combinations |
7404
fb61ce5915fc
commit https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6
Christian Brabandt <cb@256bit.org>
parents:
6765
diff
changeset
|
87 l äö üᾱ̆́ |