forked from aniani/vim
Problem: Tiny and small builds have no test coverage.
Solution: Restore tests that do not depend on the +eval feature.
(Ken Takata, closes #6696)
90 lines
1.3 KiB
Plaintext
90 lines
1.3 KiB
Plaintext
Tests for regexp with backslash and other special characters inside []
|
||
Also test backslash for hex/octal numbered character.
|
||
|
||
STARTTEST
|
||
:set nocompatible viminfo+=nviminfo
|
||
/[\x]
|
||
x/[\t\]]
|
||
x/[]y]
|
||
x/[\]]
|
||
x/[y^]
|
||
x/[$y]
|
||
x/[\x61]
|
||
x/[\x60-\x64]
|
||
xj0/[\x785]
|
||
x/[\o143]
|
||
x/[\o140-\o144]
|
||
x/[\o417]
|
||
x/\%x42
|
||
x/\%o103
|
||
x/[\x00]
|
||
x
|
||
:s/[\x00-\x10]//g
|
||
|
||
:s/[\x-z]\+//
|
||
|
||
:s/[\u-z]\{2,}//
|
||
|
||
:s/\(a\)\+//
|
||
|
||
:s/\(a*\)\+//
|
||
|
||
:s/\(a*\)*//
|
||
|
||
:s/\(a\)\{2,3}/A/
|
||
|
||
:s/\(a\)\{-2,3}/A/
|
||
|
||
:s/\(a\)*\(12\)\@>/A/
|
||
|
||
:s/\(foo\)\@<!bar/A/
|
||
|
||
:s/\(an\_s\+\)\@<=file/A/
|
||
|
||
:s/^\(\h\w*\%(->\|\.\)\=\)\+=/XX/
|
||
|
||
:s/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/
|
||
|
||
:s/aaa/xyz/
|
||
|
||
:s/~/bcd/
|
||
|
||
:s/~\+/BB/
|
||
:"
|
||
:?start?,$w! test.out
|
||
:qa!
|
||
ENDTEST
|
||
|
||
start
|
||
test \text test text
|
||
test text test text
|
||
test text ]test text
|
||
test ]text test text
|
||
test text te^st text
|
||
test te$xt test text
|
||
test taext test text x61
|
||
test tbext test text x60-x64
|
||
test 5text test text x78 5
|
||
testc text test text o143
|
||
tesdt text test text o140-o144
|
||
test7 text test text o41 7
|
||
test text tBest text \%x42
|
||
test text teCst text \%o103
|
||
test text |