]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0053: E1281 not tested with the old regexp engine v9.0.0053
authorDominique Pelle <dominique.pelle@gmail.com>
Thu, 14 Jul 2022 16:40:49 +0000 (17:40 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 14 Jul 2022 16:40:49 +0000 (17:40 +0100)
Problem:    E1281 not tested with the old regexp engine.
Solution:   Loop over the values of 'regexp'. (Dominique PellĂ©, closes #10695)

src/testdir/test_regexp_latin.vim
src/version.c

index dce6709ff779cbfceba2404a7fb4b55c9bf55549..1ba7d17a1acf983dc2e9894780a4ac45eed055f8 100644 (file)
@@ -1101,13 +1101,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, '$'))
index 3c4e96cf3c6b1f336b35f59af0031af13f1c4fa5..9e7a9885c4da5813a83c7238e80d41e7de0660a8 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    53,
 /**/
     52,
 /**/