Files
vim-ingo-library-mirror/tests/regexp/split/t3090-AddPatternByProjectedMatchLength-invalid.vim
Ingo Karkat 092fdd7ea4 ingo#regexp#split#AddPatternByProjectedMatchLength(): Handle PrefixGroupsSuffix exceptions
Clients don't expect an exception here; invalid patterns (to be added and in existing branches) should just be treated as undetermined length.
2018-09-02 17:47:16 +02:00

10 lines
544 B
VimL

" Test addition of/to invalid patterns.
call vimtest#StartTap()
call vimtap#Plan(2)
call vimtap#Is(ingo#regexp#split#AddPatternByProjectedMatchLength(['fooxies', 'f\%(Foo\|B\(ar\|il\|ox\|Fox\)Trott', 'fo'], 'foo'), ['fooxies', 'f\%(Foo\|B\(ar\|il\|ox\|Fox\)Trott', 'foo', 'fo'], 'add, skip invalid pattern')
call vimtap#Is(ingo#regexp#split#AddPatternByProjectedMatchLength(['fooxies', 'fo'], 'f\%(Foo\|B\(ar\|il\|ox\|Fox\)Trott'), ['fooxies', 'fo', 'f\%(Foo\|B\(ar\|il\|ox\|Fox\)Trott'], 'invalid pattern added at end')
call vimtest#Quit()