0
0
mirror of https://github.com/vim/vim.git synced 2025-11-13 22:54:27 -05:00

updated for version 7.3.1122

Problem:    New regexp engine: \%> not supported.
Solution:   Implement \%>.
This commit is contained in:
Bram Moolenaar
2013-06-05 18:52:40 +02:00
parent 67604aed75
commit 8795374bd3
4 changed files with 126 additions and 32 deletions

View File

@@ -385,6 +385,12 @@ STARTTEST
:call add(tl, [2, '\(<<\)\@2<=span.', 'xxspanxxxx<spanxx<<spanyyy', 'spany', '<<'])
:call add(tl, [2, '\(foo\)\@<!bar.', 'xx foobar1 xbar2 xx', 'bar2'])
:"
:""""" \@>
:call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
:call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
:" TODO: BT engine does not restore submatch after failure
:call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa'])
:"
:"""" "\_" prepended negated collection matches EOL
:call add(tl, [2, '\_[^8-9]\+', "asfi\n9888", "asfi\n"])
:call add(tl, [2, '\_[^a]\+', "asfi\n9888", "sfi\n9888"])
@@ -401,7 +407,7 @@ STARTTEST
: let text = t[2]
: let matchidx = 3
: for engine in [0, 1, 2]
: if engine == 2 && !re
: if engine == 2 && re == 0 || engine == 1 && re ==1
: continue
: endif
: let &regexpengine = engine

View File

@@ -872,6 +872,14 @@ OK 2 - \(<<\)\@2<=span.
OK 0 - \(foo\)\@<!bar.
OK 1 - \(foo\)\@<!bar.
OK 2 - \(foo\)\@<!bar.
OK 0 - \(a*\)\@>a
OK 1 - \(a*\)\@>a
OK 2 - \(a*\)\@>a
OK 0 - \(a*\)\@>b
OK 1 - \(a*\)\@>b
OK 2 - \(a*\)\@>b
OK 0 - \(a*\)\@>a\|a\+
OK 2 - \(a*\)\@>a\|a\+
OK 0 - \_[^8-9]\+
OK 1 - \_[^8-9]\+
OK 2 - \_[^8-9]\+