mirror of
https://github.com/inkarkat/vim-ingo-library.git
synced 2026-05-29 11:18:51 +02:00
092fdd7ea4
Clients don't expect an exception here; invalid patterns (to be added and in existing branches) should just be treated as undetermined length.
10 lines
544 B
VimL
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()
|