comparison src/testdir/test95.in @ 7003:bc269cf15ccd v7.4.819

patch 7.4.819 Problem: Beeping when running the tests. Solution: Fix 41 beeps. (Roland Eggner)
author Bram Moolenaar <bram@vim.org>
date Tue, 11 Aug 2015 18:33:48 +0200
parents fdea5ea9afd1
children ad9e9e92ad55
comparison
equal deleted inserted replaced
7002:6db4f492c515 7003:bc269cf15ccd
16 :" expected submatch 1 (optional) 16 :" expected submatch 1 (optional)
17 :" expected submatch 2 (optional) 17 :" expected submatch 2 (optional)
18 :" etc. 18 :" etc.
19 :" When there is no match use only the first two items. 19 :" When there is no match use only the first two items.
20 :let tl = [] 20 :let tl = []
21 21 :
22 :"""" Multi-byte character tests. These will fail unless vim is compiled 22 :"""" Multi-byte character tests. These will fail unless vim is compiled
23 :"""" with Multibyte (FEAT_MBYTE) or BIG/HUGE features. 23 :"""" with Multibyte (FEAT_MBYTE) or BIG/HUGE features.
24 :call add(tl, [2, '[[:alpha:][=a=]]\+', '879 aiaãâaiuvna ', 'aiaãâaiuvna']) 24 :call add(tl, [2, '[[:alpha:][=a=]]\+', '879 aiaãâaiuvna ', 'aiaãâaiuvna'])
25 :call add(tl, [2, '[[=a=]]\+', 'ddaãâbcd', 'aãâ']) " equivalence classes 25 :call add(tl, [2, '[[=a=]]\+', 'ddaãâbcd', 'aãâ']) " equivalence classes
26 :call add(tl, [2, '[^ม ]\+', 'มม oijasoifjos ifjoisj f osij j มมมมม abcd', 'oijasoifjos']) 26 :call add(tl, [2, '[^ม ]\+', 'มม oijasoifjos ifjoisj f osij j มมมมม abcd', 'oijasoifjos'])
27 :call add(tl, [2, ' [^ ]\+', 'start มabcdม ', ' มabcdม']) 27 :call add(tl, [2, ' [^ ]\+', 'start มabcdม ', ' มabcdม'])
28 :call add(tl, [2, '[ม[:alpha:][=a=]]\+', '879 aiaãมâมaiuvna ', 'aiaãมâมaiuvna']) 28 :call add(tl, [2, '[ม[:alpha:][=a=]]\+', '879 aiaãมâมaiuvna ', 'aiaãมâมaiuvna'])
29 29 :
30 :" this is not a normal "i" but 0xec 30 :" this is not a normal "i" but 0xec
31 :call add(tl, [2, '\p\+', 'ìa', 'ìa']) 31 :call add(tl, [2, '\p\+', 'ìa', 'ìa'])
32 :call add(tl, [2, '\p*', 'aあ', 'aあ']) 32 :call add(tl, [2, '\p*', 'aあ', 'aあ'])
33 33 :
34 :"""" Test recognition of some character classes 34 :"""" Test recognition of some character classes
35 :call add(tl, [2, '\i\+', '&*¨xx ', 'xx']) 35 :call add(tl, [2, '\i\+', '&*¨xx ', 'xx'])
36 :call add(tl, [2, '\f\+', '&*Ÿfname ', 'fname']) 36 :call add(tl, [2, '\f\+', '&*Ÿfname ', 'fname'])
37 37 :
38 :"""" Test composing character matching 38 :"""" Test composing character matching
39 :call add(tl, [2, '.ม', 'xม่x yมy', 'yม']) 39 :call add(tl, [2, '.ม', 'xม่x yมy', 'yม'])
40 :call add(tl, [2, '.ม่', 'xม่x yมy', 'xม่']) 40 :call add(tl, [2, '.ม่', 'xม่x yมy', 'xม่'])
41 :call add(tl, [2, "\u05b9", " x\u05b9 ", "x\u05b9"]) 41 :call add(tl, [2, "\u05b9", " x\u05b9 ", "x\u05b9"])
42 :call add(tl, [2, ".\u05b9", " x\u05b9 ", "x\u05b9"]) 42 :call add(tl, [2, ".\u05b9", " x\u05b9 ", "x\u05b9"])
54 :call add(tl, [2, "ca", "ca\u0300t"]) 54 :call add(tl, [2, "ca", "ca\u0300t"])
55 :call add(tl, [2, "a\u0300", "ca\u0300t", "a\u0300"]) 55 :call add(tl, [2, "a\u0300", "ca\u0300t", "a\u0300"])
56 :call add(tl, [2, 'a\%C', "ca\u0300t", "a\u0300"]) 56 :call add(tl, [2, 'a\%C', "ca\u0300t", "a\u0300"])
57 :call add(tl, [2, 'ca\%C', "ca\u0300t", "ca\u0300"]) 57 :call add(tl, [2, 'ca\%C', "ca\u0300t", "ca\u0300"])
58 :call add(tl, [2, 'ca\%Ct', "ca\u0300t", "ca\u0300t"]) 58 :call add(tl, [2, 'ca\%Ct', "ca\u0300t", "ca\u0300t"])
59 59 :
60 60 :
61 :"""" Test \Z 61 :"""" Test \Z
62 :call add(tl, [2, 'ú\Z', 'x']) 62 :call add(tl, [2, 'ú\Z', 'x'])
63 :call add(tl, [2, 'יהוה\Z', 'יהוה', 'יהוה']) 63 :call add(tl, [2, 'יהוה\Z', 'יהוה', 'יהוה'])
64 :call add(tl, [2, 'יְהוָה\Z', 'יהוה', 'יהוה']) 64 :call add(tl, [2, 'יְהוָה\Z', 'יהוה', 'יהוה'])
65 :call add(tl, [2, 'יהוה\Z', 'יְהוָה', 'יְהוָה']) 65 :call add(tl, [2, 'יהוה\Z', 'יְהוָה', 'יְהוָה'])
73 :call add(tl, [2, "\\Z\u05b9", "xyz"]) 73 :call add(tl, [2, "\\Z\u05b9", "xyz"])
74 :call add(tl, [2, "\u05b9\\Z", "xy\u05b9z", "y\u05b9"]) 74 :call add(tl, [2, "\u05b9\\Z", "xy\u05b9z", "y\u05b9"])
75 :call add(tl, [2, "\\Z\u05b9", "xy\u05b9z", "y\u05b9"]) 75 :call add(tl, [2, "\\Z\u05b9", "xy\u05b9z", "y\u05b9"])
76 :call add(tl, [1, "\u05b9\\+\\Z", "xy\u05b9z\u05b9 ", "y\u05b9z\u05b9"]) 76 :call add(tl, [1, "\u05b9\\+\\Z", "xy\u05b9z\u05b9 ", "y\u05b9z\u05b9"])
77 :call add(tl, [1, "\\Z\u05b9\\+", "xy\u05b9z\u05b9 ", "y\u05b9z\u05b9"]) 77 :call add(tl, [1, "\\Z\u05b9\\+", "xy\u05b9z\u05b9 ", "y\u05b9z\u05b9"])
78 78 :
79 :"""" Combining different tests and features 79 :"""" Combining different tests and features
80 :call add(tl, [2, '[^[=a=]]\+', 'ddaãâbcd', 'dd']) 80 :call add(tl, [2, '[^[=a=]]\+', 'ddaãâbcd', 'dd'])
81 81 :
82 :"""" Run the tests 82 :"""" Run the tests
83 83 :
84 :" 84 :"
85 :for t in tl 85 :for t in tl
86 : let re = t[0] 86 : let re = t[0]
87 : let pat = t[1] 87 : let pat = t[1]
88 : let text = t[2] 88 : let text = t[2]
122 : unlet i 122 : unlet i
123 : endif 123 : endif
124 : endfor 124 : endfor
125 :endfor 125 :endfor
126 :unlet t tl e l 126 :unlet t tl e l
127 127 :
128 :" check that 'ambiwidth' does not change the meaning of \p 128 :" check that 'ambiwidth' does not change the meaning of \p
129 :set regexpengine=1 ambiwidth=single 129 :set regexpengine=1 ambiwidth=single
130 :$put ='eng 1 ambi single: ' . match(\"\u00EC\", '\p') 130 :$put ='eng 1 ambi single: ' . match(\"\u00EC\", '\p')
131 :set regexpengine=1 ambiwidth=double 131 :set regexpengine=1 ambiwidth=double
132 :$put ='eng 1 ambi double: ' . match(\"\u00EC\", '\p') 132 :$put ='eng 1 ambi double: ' . match(\"\u00EC\", '\p')
133 :set regexpengine=2 ambiwidth=single 133 :set regexpengine=2 ambiwidth=single
134 :$put ='eng 2 ambi single: ' . match(\"\u00EC\", '\p') 134 :$put ='eng 2 ambi single: ' . match(\"\u00EC\", '\p')
135 :set regexpengine=2 ambiwidth=double 135 :set regexpengine=2 ambiwidth=double
136 :$put ='eng 2 ambi double: ' . match(\"\u00EC\", '\p') 136 :$put ='eng 2 ambi double: ' . match(\"\u00EC\", '\p')
137 137 :
138 :/\%#=1^Results/,$wq! test.out 138 :/\%#=1^Results/,$wq! test.out
139 ENDTEST 139 ENDTEST
140 140
141 Results of test95: 141 Results of test95: