diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-29 18:45:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-29 18:45:11 +0200 |
commit | 75eb1610e128de0dd7c19ceef0d0c45730fdc1a1 (patch) | |
tree | f75cf1f5b4088ac0825587a03687f0d6d59e9abf /src/testdir/test64.in | |
parent | f9e56b2b03efbad3b62183e66e845fbff64af14a (diff) | |
download | vim-git-75eb1610e128de0dd7c19ceef0d0c45730fdc1a1.tar.gz |
updated for version 7.3.1037v7.3.1037
Problem: Look-behind matching is very slow on long lines.
Solution: Add a byte limit to how far back an attempt is made.
Diffstat (limited to 'src/testdir/test64.in')
-rw-r--r-- | src/testdir/test64.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test64.in b/src/testdir/test64.in index a81cd0cfd..667e194e1 100644 --- a/src/testdir/test64.in +++ b/src/testdir/test64.in @@ -336,6 +336,14 @@ STARTTEST :"call add(tl, [2, '\(\i\+\) \1', 'xgoo goox', 'goo goo', 'goo']) :call add(tl, [2, '\(a\)\(b\)\(c\)\(dd\)\(e\)\(f\)\(g\)\(h\)\(i\)\1\2\3\4\5\6\7\8\9', 'xabcddefghiabcddefghix', 'abcddefghiabcddefghi', 'a', 'b', 'c', 'dd', 'e', 'f', 'g', 'h', 'i']) :" +:"""" Look-behind with limit +:call add(tl, [0, '<\@<=span.', 'xxspanxx<spanyyy', 'spany']) +:call add(tl, [0, '<\@1<=span.', 'xxspanxx<spanyyy', 'spany']) +:call add(tl, [0, '<\@2<=span.', 'xxspanxx<spanyyy', 'spany']) +:call add(tl, [0, '\(<<\)\@<=span.', 'xxspanxxxx<spanxx<<spanyyy', 'spany', '<<']) +:call add(tl, [0, '\(<<\)\@1<=span.', 'xxspanxxxx<spanxx<<spanyyy']) +:call add(tl, [0, '\(<<\)\@2<=span.', 'xxspanxxxx<spanxx<<spanyyy', 'spany', '<<']) +:" :"""" Run the tests :" :" @@ -406,6 +414,12 @@ Gop:" y$Gop:" :" :" +:" Check a pattern with a look beind crossing a line boundary +/^Behind: +/\(<\_[xy]\+\)\@3<=start +:.yank +Gop:" +:" :/\%#=1^Results/,$wq! test.out ENDTEST @@ -423,4 +437,12 @@ ghi xjk lmn +Behind: +asdfasd<yyy +xxstart1 +asdfasd<yy +xxxxstart2 +asdfasd<yy +xxxstart3 + Results of test64: |