]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0612: blockedit test passes with wrong result v9.0.0612
authorBram Moolenaar <Bram@vim.org>
Tue, 27 Sep 2022 21:18:13 +0000 (22:18 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 27 Sep 2022 21:18:13 +0000 (22:18 +0100)
Problem:    Blockedit test passes with wrong result.
Solution:   Add a "vim9script" line to make indenting work.

src/testdir/test_blockedit.vim
src/version.c

index 779c6472a6fdc4a0d1a00ee7fdec8603277b81c3..8497efb083d4f1e4704586f937bd91dbba0ad1aa 100644 (file)
@@ -17,6 +17,7 @@ endfunc
 func Test_blockinsert_autoindent()
   new
   let lines =<< trim END
+      vim9script
       var d = {
       a: () => 0,
       b: () => 0,
@@ -27,42 +28,42 @@ func Test_blockinsert_autoindent()
   filetype plugin indent on
   setlocal sw=2 et ft=vim
   setlocal indentkeys+=:
-  exe "norm! 2Gf)\<c-v>2jA: asdf\<esc>"
-  " FIXME: what do we really expect?
+  exe "norm! 3Gf)\<c-v>2jA: asdf\<esc>"
   let expected =<< trim END
+      vim9script
       var d = {
-      a: (): asdf => 0,
+        a: (): asdf => 0,
       b: (): asdf => 0,
       c: (): asdf => 0,
       }
   END
-  call assert_equal(expected, getline(1, 5))
+  call assert_equal(expected, getline(1, 6))
 
   " insert on the next column should do exactly the same
   :%dele
   call setline(1, lines)
-  exe "norm! 2Gf)l\<c-v>2jI: asdf\<esc>"
-  call assert_equal(expected, getline(1, 5))
+  exe "norm! 3Gf)l\<c-v>2jI: asdf\<esc>"
+  call assert_equal(expected, getline(1, 6))
 
   :%dele
   call setline(1, lines)
   setlocal sw=8 noet
-  exe "norm! 2Gf)\<c-v>2jA: asdf\<esc>"
-  " FIXME: what do we really expect?
+  exe "norm! 3Gf)\<c-v>2jA: asdf\<esc>"
   let expected =<< trim END
+      vim9script
       var d = {
-      a: (): asdf => 0,
+       a: (): asdf => 0,
       b: (): asdf => 0,
       c: (): asdf => 0,
       }
   END
-  call assert_equal(expected, getline(1, 5))
+  call assert_equal(expected, getline(1, 6))
 
   " insert on the next column should do exactly the same
   :%dele
   call setline(1, lines)
-  exe "norm! 2Gf)l\<c-v>2jI: asdf\<esc>"
-  call assert_equal(expected, getline(1, 5))
+  exe "norm! 3Gf)l\<c-v>2jI: asdf\<esc>"
+  call assert_equal(expected, getline(1, 6))
 
   filetype off
   bwipe!
index b582b264be8e006daf1b42f7298b5bd67f8decba..e92207e362c69035996179f0c515dc95126e73fd 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    612,
 /**/
     611,
 /**/