Mercurial > vim
comparison src/testdir/test95.in @ 5221:9982ec574beb v7.4a.036
updated for version 7.4a.036
Problem: "\p" in a regexp does not match double-width characters.
(Yukihiro Nakadaira)
Solution: Don't count display cells, use vim_isprintc().
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 21 Jul 2013 17:06:00 +0200 |
parents | f10f63aaec5c |
children | 60cdaa05a6ad |
comparison
equal
deleted
inserted
replaced
5220:050893d44c33 | 5221:9982ec574beb |
---|---|
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 | 33 |
33 :"""" Test recognition of some character classes | 34 :"""" Test recognition of some character classes |
34 :call add(tl, [2, '\i\+', '&*¨xx ', 'xx']) | 35 :call add(tl, [2, '\i\+', '&*¨xx ', 'xx']) |
35 :call add(tl, [2, '\f\+', '&*fname ', 'fname']) | 36 :call add(tl, [2, '\f\+', '&*fname ', 'fname']) |
36 | 37 |
116 : endif | 117 : endif |
117 : endfor | 118 : endfor |
118 :endfor | 119 :endfor |
119 :unlet t tl e l | 120 :unlet t tl e l |
120 | 121 |
122 :" check that 'ambiwidth' does not change the meaning of \p | |
123 :set regexpengine=1 ambiwidth=single | |
124 :$put ='eng 1 ambi single: ' . match(\"\u00EC\", '\p') | |
125 :set regexpengine=1 ambiwidth=double | |
126 :$put ='eng 1 ambi double: ' . match(\"\u00EC\", '\p') | |
127 :set regexpengine=2 ambiwidth=single | |
128 :$put ='eng 2 ambi single: ' . match(\"\u00EC\", '\p') | |
129 :set regexpengine=2 ambiwidth=double | |
130 :$put ='eng 2 ambi double: ' . match(\"\u00EC\", '\p') | |
131 | |
121 :/\%#=1^Results/,$wq! test.out | 132 :/\%#=1^Results/,$wq! test.out |
122 ENDTEST | 133 ENDTEST |
123 | 134 |
124 Results of test95: | 135 Results of test95: |