1Tests for regexp with backslash and other special characters inside [] 2Also test backslash for hex/octal numbered character. 3 4STARTTEST 5:set nocompatible viminfo+=nviminfo 6/[\x] 7x/[\t\]] 8x/[]y] 9x/[\]] 10x/[y^] 11x/[$y] 12x/[\x61] 13x/[\x60-\x64] 14xj0/[\x785] 15x/[\o143] 16x/[\o140-\o144] 17x/[\o417] 18x/\%x42 19x/\%o103 20x/[\x00] 21x 22:s/[\x00-\x10]//g 23 24:s/[\x-z]\+// 25 26:s/[\u-z]\{2,}// 27 28:s/\(a\)\+// 29 30:s/\(a*\)\+// 31 32:s/\(a*\)*// 33 34:s/\(a\)\{2,3}/A/ 35 36:s/\(a\)\{-2,3}/A/ 37 38:s/\(a\)*\(12\)\@>/A/ 39 40:s/\(foo\)\@<!bar/A/ 41 42:s/\(an\_s\+\)\@<=file/A/ 43 44:s/^\(\h\w*\%(->\|\.\)\=\)\+=/XX/ 45 46:s/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/ 47 48:s/aaa/xyz/ 49 50:s/~/bcd/ 51 52:s/~\+/BB/ 53:" 54:?start?,$w! test.out 55:qa! 56ENDTEST 57 58start 59test \text test text 60test text test text 61test text ]test text 62test ]text test text 63test text te^st text 64test te$xt test text 65test taext test text x61 66test tbext test text x60-x64 67test 5text test text x78 5 68testc text test text o143 69tesdt text test text o140-o144 70test7 text test text o41 7 71test text tBest text \%x42 72test text teCst text \%o103 73test text test text [\x00] 74test text test text [\x00-\x10] 75test \xyztext test text [\x-z] 76test text tev\uyst text [\u-z] 77xx aaaaa xx a 78xx aaaaa xx a 79xx aaaaa xx a 80xx aaaaa xx 81xx aaaaa xx 82xx aaa12aa xx 83xx foobar xbar xx 84xx an file xx 85x= 9; 86hh= 77; 87 aaa 88 xyz 89 bcdbcdbcd 90