summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_regexp_latin.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_regexp_latin.vim')
-rw-r--r--src/testdir/test_regexp_latin.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_regexp_latin.vim b/src/testdir/test_regexp_latin.vim
index 0b288f69fd..1fe4699d10 100644
--- a/src/testdir/test_regexp_latin.vim
+++ b/src/testdir/test_regexp_latin.vim
@@ -1096,4 +1096,22 @@ 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
+
" vim: shiftwidth=2 sts=2 expandtab