forked from aniani/vim
patch 9.0.0053: E1281 not tested with the old regexp engine
Problem: E1281 not tested with the old regexp engine. Solution: Loop over the values of 'regexp'. (Dominique Pellé, closes #10695)
This commit is contained in:
committed by
Bram Moolenaar
parent
2ebcc35826
commit
3a393790a4
@@ -1101,13 +1101,17 @@ func Test_using_two_engines_pattern()
|
|||||||
call setline(1, ['foobar=0', 'foobar=1', 'foobar=2'])
|
call setline(1, ['foobar=0', 'foobar=1', 'foobar=2'])
|
||||||
" \%#= at the end of the pattern
|
" \%#= at the end of the pattern
|
||||||
for i in range(0, 2)
|
for i in range(0, 2)
|
||||||
call cursor( (i+1), 7)
|
for j in range(0, 2)
|
||||||
call assert_fails("%s/foobar\\%#=" .. i, 'E1281:')
|
exe "set re=" .. i
|
||||||
|
call cursor(j + 1, 7)
|
||||||
|
call assert_fails("%s/foobar\\%#=" .. j, 'E1281:')
|
||||||
endfor
|
endfor
|
||||||
|
endfor
|
||||||
|
set re=0
|
||||||
|
|
||||||
" \%#= at the start of the pattern
|
" \%#= at the start of the pattern
|
||||||
for i in range(0, 2)
|
for i in range(0, 2)
|
||||||
call cursor( (i+1), 7)
|
call cursor(i + 1, 7)
|
||||||
exe ":%s/\\%#=" .. i .. "foobar=" .. i .. "/xx"
|
exe ":%s/\\%#=" .. i .. "foobar=" .. i .. "/xx"
|
||||||
endfor
|
endfor
|
||||||
call assert_equal(['xx', 'xx', 'xx'], getline(1, '$'))
|
call assert_equal(['xx', 'xx', 'xx'], getline(1, '$'))
|
||||||
|
@@ -735,6 +735,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
53,
|
||||||
/**/
|
/**/
|
||||||
52,
|
52,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user