comparison src/testdir/test_regexp_latin.vim @ 29423:1ad5585bed52 v9.0.0053

patch 9.0.0053: E1281 not tested with the old regexp engine Commit: https://github.com/vim/vim/commit/3a393790a4fd7a5edcafbb55cd79438b6e641714 Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Thu Jul 14 17:40:49 2022 +0100 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 https://github.com/vim/vim/issues/10695)
author Bram Moolenaar <Bram@vim.org>
date Thu, 14 Jul 2022 18:45:02 +0200
parents be069ab9d583
children f1c5bd4acbbc
comparison
equal deleted inserted replaced
29422:e53620f59deb 29423:1ad5585bed52
1099 func Test_using_two_engines_pattern() 1099 func Test_using_two_engines_pattern()
1100 new 1100 new
1101 call setline(1, ['foobar=0', 'foobar=1', 'foobar=2']) 1101 call setline(1, ['foobar=0', 'foobar=1', 'foobar=2'])
1102 " \%#= at the end of the pattern 1102 " \%#= at the end of the pattern
1103 for i in range(0, 2) 1103 for i in range(0, 2)
1104 call cursor( (i+1), 7) 1104 for j in range(0, 2)
1105 call assert_fails("%s/foobar\\%#=" .. i, 'E1281:') 1105 exe "set re=" .. i
1106 call cursor(j + 1, 7)
1107 call assert_fails("%s/foobar\\%#=" .. j, 'E1281:')
1108 endfor
1106 endfor 1109 endfor
1110 set re=0
1107 1111
1108 " \%#= at the start of the pattern 1112 " \%#= at the start of the pattern
1109 for i in range(0, 2) 1113 for i in range(0, 2)
1110 call cursor( (i+1), 7) 1114 call cursor(i + 1, 7)
1111 exe ":%s/\\%#=" .. i .. "foobar=" .. i .. "/xx" 1115 exe ":%s/\\%#=" .. i .. "foobar=" .. i .. "/xx"
1112 endfor 1116 endfor
1113 call assert_equal(['xx', 'xx', 'xx'], getline(1, '$')) 1117 call assert_equal(['xx', 'xx', 'xx'], getline(1, '$'))
1114 bwipe! 1118 bwipe!
1115 endfunc 1119 endfunc