diff options
Diffstat (limited to 'src/nvim/testdir/test_regexp_latin.vim')
-rw-r--r-- | src/nvim/testdir/test_regexp_latin.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_regexp_latin.vim b/src/nvim/testdir/test_regexp_latin.vim index 5312c6f26a..3a4a7ad910 100644 --- a/src/nvim/testdir/test_regexp_latin.vim +++ b/src/nvim/testdir/test_regexp_latin.vim @@ -1058,6 +1058,24 @@ func Test_using_invalid_visual_position() bwipe! endfunc +func Test_using_two_engines_pattern() + new + call setline(1, ['foobar=0', 'foobar=1', 'foobar=2']) + " \%#= at the end of the pattern + for i in range(0, 2) + call cursor( (i+1), 7) + call assert_fails("%s/foobar\\%#=" .. i, 'E1281:') + endfor + + " \%#= at the start of the pattern + for i in range(0, 2) + call cursor( (i+1), 7) + exe ":%s/\\%#=" .. i .. "foobar=" .. i .. "/xx" + endfor + call assert_equal(['xx', 'xx', 'xx'], getline(1, '$')) + bwipe! +endfunc + func Test_recursive_substitute_expr() new func Repl() |