Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame^] | 1 | Tests for regexp with multi-byte encoding and various magic settings. |
| 2 | |
| 3 | STARTTEST |
| 4 | :so mbyte.vim |
| 5 | :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo |
| 6 | /^1 |
| 7 | /a*b\{2}c\+/e |
| 8 | x/\Md\*e\{2}f\+/e |
| 9 | x:set nomagic |
| 10 | /g\*h\{2}i\+/e |
| 11 | x/\mj*k\{2}l\+/e |
| 12 | x/\vm*n{2}o+/e |
| 13 | x/\V^aa$ |
| 14 | x:set magic |
| 15 | /\v(a)(b)\2\1\1/e |
| 16 | x/\V[ab]\(\[xy]\)\1 |
| 17 | x:" Now search for multi-byte without composing char |
| 18 | /ม |
| 19 | x:" Now search for multi-byte with composing char |
| 20 | /ม่ |
| 21 | x:" find word by change of word class |
| 22 | /ち\<カヨ\>は |
| 23 | x:?^1?,$w! test.out |
| 24 | :qa! |
| 25 | ENDTEST |
| 26 | |
| 27 | 1 a aa abb abbccc |
| 28 | 2 d dd dee deefff |
| 29 | 3 g gg ghh ghhiii |
| 30 | 4 j jj jkk jkklll |
| 31 | 5 m mm mnn mnnooo |
| 32 | 6 x ^aa$ x |
| 33 | 7 (a)(b) abbaa |
| 34 | 8 axx [ab]xx |
| 35 | 9 หม่x อมx |
| 36 | a อมx หม่x |
| 37 | b ちカヨは |