diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-05 16:03:00 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-05 16:09:22 +0800 |
commit | e33ffab1a776518dbf59ba5fe82453fa019569eb (patch) | |
tree | 774c6d91442f0035ac7e03729be79a53fcfc257d | |
parent | b84666d2a0dc4a7585ef6aa5a8f9060046ff9082 (diff) | |
download | rneovim-e33ffab1a776518dbf59ba5fe82453fa019569eb.tar.gz rneovim-e33ffab1a776518dbf59ba5fe82453fa019569eb.tar.bz2 rneovim-e33ffab1a776518dbf59ba5fe82453fa019569eb.zip |
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 vim/vim#10695)
https://github.com/vim/vim/commit/3a393790a4fd7a5edcafbb55cd79438b6e641714
Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
-rw-r--r-- | src/nvim/testdir/test_regexp_latin.vim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_regexp_latin.vim b/src/nvim/testdir/test_regexp_latin.vim index 3a4a7ad910..ece6ae518e 100644 --- a/src/nvim/testdir/test_regexp_latin.vim +++ b/src/nvim/testdir/test_regexp_latin.vim @@ -1063,13 +1063,17 @@ func Test_using_two_engines_pattern() 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:') + for j in range(0, 2) + exe "set re=" .. i + call cursor(j + 1, 7) + call assert_fails("%s/foobar\\%#=" .. j, 'E1281:') + endfor endfor + set re=0 " \%#= at the start of the pattern for i in range(0, 2) - call cursor( (i+1), 7) + call cursor(i + 1, 7) exe ":%s/\\%#=" .. i .. "foobar=" .. i .. "/xx" endfor call assert_equal(['xx', 'xx', 'xx'], getline(1, '$')) |