mirror of
https://github.com/vim/vim.git
synced 2025-11-15 23:14:06 -05:00
updated for version 7.3.1017
Problem: Zero width match changes length of match.
Solution: For a zero width match put new states in the current position in
the state list.
This commit is contained in:
@@ -270,6 +270,7 @@ STARTTEST
|
||||
:call add(tl, ['aa \zsax', ' ax']) " must match before \zs
|
||||
:call add(tl, ['abc \zsmatch\ze abc', 'abc abc abc match abc abc', 'match'])
|
||||
:call add(tl, ['\v(a \zsif .*){2}', 'a if then a if last', 'if last', 'a if last'])
|
||||
:call add(tl, ['\>\zs.', 'aword. ', '.'])
|
||||
|
||||
:"""" Tests for \@ features
|
||||
:call add(tl, ['abc\@=', 'abc', 'ab'])
|
||||
@@ -299,6 +300,12 @@ STARTTEST
|
||||
:call add(tl, ['\%u0020', 'yes no', ' '])
|
||||
:call add(tl, ['\%U00000020', 'yes no', ' '])
|
||||
|
||||
:"""" Alternatives, must use first longest match
|
||||
:call add(tl, ['goo\|go', 'google', 'goo'])
|
||||
:call add(tl, ['\<goo\|\<go', 'google', 'goo'])
|
||||
:call add(tl, ['\<goo\|go', 'google', 'goo'])
|
||||
|
||||
|
||||
:"""" Run the tests
|
||||
|
||||
:"
|
||||
|
||||
@@ -209,6 +209,7 @@ OK - abc\zsdd
|
||||
OK - aa \zsax
|
||||
OK - abc \zsmatch\ze abc
|
||||
OK - \v(a \zsif .*){2}
|
||||
OK - \>\zs.
|
||||
OK - abc\@=
|
||||
OK - abc\@=cd
|
||||
OK - abc\@=
|
||||
@@ -231,4 +232,7 @@ OK - \%o40
|
||||
OK - \%x20
|
||||
OK - \%u0020
|
||||
OK - \%U00000020
|
||||
OK - goo\|go
|
||||
OK - \<goo\|\<go
|
||||
OK - \<goo\|go
|
||||
192.168.0.1
|
||||
|
||||
Reference in New Issue
Block a user