changeset 28944:f498ab5c82ea v8.2.4994

patch 8.2.4994: tests are using legacy functions Commit: https://github.com/vim/vim/commit/7e569d09d2ec4fa334a2d3d5b0b6dbca16d97133 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 21 21:30:50 2022 +0100 patch 8.2.4994: tests are using legacy functions Problem: Tests are using legacy functions. Solution: Convert a few tests to use :def functions.
author Bram Moolenaar <Bram@vim.org>
date Sat, 21 May 2022 22:45:03 +0200
parents 17ca7f6f60ab
children eee8b659f29c
files src/testdir/test_cindent.vim src/version.c
diffstat 2 files changed, 637 insertions(+), 620 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_cindent.vim
+++ b/src/testdir/test_cindent.vim
@@ -1,22 +1,22 @@
 " Test for cinoptions and cindent
 
-func Test_cino_hash()
-  " Test that curbuf->b_ind_hash_comment is correctly reset
+def Test_cino_hash()
+  # Test that curbuf->b_ind_hash_comment is correctly reset
   new
   setlocal cindent cinoptions=#1
   setlocal cinoptions=
-  call setline(1, ["#include <iostream>"])
-  call cursor(1, 1)
+  setline(1, ["#include <iostream>"])
+  cursor(1, 1)
   norm! o#include
-  "call feedkeys("o#include\<esc>", 't')
-  call assert_equal(["#include <iostream>", "#include"], getline(1,2))
+  assert_equal(["#include <iostream>", "#include"], getline(1, 2))
+
   bwipe!
-endfunc
-
-func Test_cino_extern_c()
-  " Test for cino-E
-
-  let without_ind =<< trim [CODE]
+enddef
+
+def Test_cino_extern_c()
+  # Test for cino-E
+
+  var without_ind =<< trim [CODE]
     #ifdef __cplusplus
     extern "C" {
     #endif
@@ -26,7 +26,7 @@ func Test_cino_extern_c()
     #endif
   [CODE]
 
-  let with_ind =<< trim [CODE]
+  var with_ind =<< trim [CODE]
     #ifdef __cplusplus
     extern "C" {
     #endif
@@ -37,17 +37,17 @@ func Test_cino_extern_c()
   [CODE]
   new
   setlocal cindent cinoptions=E0
-  call setline(1, without_ind)
-  call feedkeys("gg=G", 'tx')
-  call assert_equal(with_ind, getline(1, '$'))
+  setline(1, without_ind)
+  feedkeys("gg=G", 'tx')
+  assert_equal(with_ind, getline(1, '$'))
 
   setlocal cinoptions=E-s
-  call setline(1, with_ind)
-  call feedkeys("gg=G", 'tx')
-  call assert_equal(without_ind, getline(1, '$'))
+  setline(1, with_ind)
+  feedkeys("gg=G", 'tx')
+  assert_equal(without_ind, getline(1, '$'))
 
   setlocal cinoptions=Es
-  let tests = [
+  var tests = [
         \ ['recognized', ['extern "C" {'], "\t\t;"],
         \ ['recognized', ['extern "C++" {'], "\t\t;"],
         \ ['recognized', ['extern /* com */ "C"{'], "\t\t;"],
@@ -60,78 +60,84 @@ func Test_cino_extern_c()
         \ ]
 
   for pair in tests
-    let lines = pair[1]
-    call setline(1, lines)
-    call feedkeys(len(lines) . "Go;", 'tx')
-    call assert_equal(pair[2], getline(len(lines) + 1), 'Failed for "' . string(lines) . '"')
+    var lines = pair[1]
+    setline(1, lines)
+    feedkeys(len(lines) .. "Go;", 'tx')
+    assert_equal(pair[2], getline(len(lines) + 1),
+                    'Failed for "' .. string(lines) .. '"')
   endfor
 
   bwipe!
-endfunc
-
-func Test_cindent_rawstring()
+enddef
+
+def Test_cindent_rawstring()
   new
   setl cindent
-  call feedkeys("i" .
-          \ "int main() {\<CR>" .
-          \ "R\"(\<CR>" .
-          \ ")\";\<CR>" .
+  feedkeys("i" ..
+          \ "int main() {\<CR>" ..
+          \ "R\"(\<CR>" ..
+          \ ")\";\<CR>" ..
           \ "statement;\<Esc>", "x")
-  call assert_equal("\tstatement;", getline(line('.')))
-  bw!
-endfunc
-
-func Test_cindent_expr()
+  assert_equal("\tstatement;", getline(line('.')))
+
+  bwipe!
+enddef
+
+def Test_cindent_expr()
   new
-  func! MyIndentFunction()
+  def g:MyIndentFunction(): number
     return v:lnum == 1 ? shiftwidth() : 0
-  endfunc
-  setl expandtab sw=8 indentkeys+=; indentexpr=MyIndentFunction()
-  let testinput =<< trim [CODE]
+  enddef
+  setl expandtab sw=8 indentkeys+=; indentexpr=g:MyIndentFunction()
+  var testinput =<< trim [CODE]
     var_a = something()
     b = something()
   [CODE]
-  call setline(1, testinput)
-  call cursor(1, 1)
-  call feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
-  let expected =<< [CODE]
+  setline(1, testinput)
+  cursor(1, 1)
+  feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
+  var expected =<< [CODE]
         var_a = something();
 b = something();
 [CODE]
-  call assert_equal(expected, getline(1, '$'))
-
-  %d
-  let testinput =<< [CODE]
+  assert_equal(expected, getline(1, '$'))
+
+  :%d
+  testinput =<< [CODE]
                 var_a = something()
                 b = something()
 [CODE]
-  call setline(1, testinput)
-  call cursor(1, 1)
-  call feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
-  let expected =<< [CODE]
+  setline(1, testinput)
+  cursor(1, 1)
+  feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
+  expected =<< [CODE]
         var_a = something();
                 b = something()
 [CODE]
-  call assert_equal(expected, getline(1, '$'))
-  bw!
-endfunc
-
-func Test_cindent_func()
+  assert_equal(expected, getline(1, '$'))
+
+  delfunc g:MyIndentFunction
+
+  bwipe!
+enddef
+
+def Test_cindent_func()
   new
   setlocal cindent
-  call setline(1, ['int main(void)', '{', 'return 0;', '}'])
-  call assert_equal(-1, cindent(0))
-  call assert_equal(&sw, 3->cindent())
-  call assert_equal(-1, cindent(line('$')+1))
+  setline(1, ['int main(void)', '{', 'return 0;', '}'])
+  assert_equal(-1, cindent(0))
+  assert_equal(&sw, 3->cindent())
+  assert_equal(-1, cindent(line('$') + 1))
+
   bwipe!
-endfunc
-
-func Test_cindent_1()
+enddef
+
+def Test_cindent_1()
   new
   setl cindent ts=4 sw=4
   setl cino& sts&
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   /* start of AUTO matically checked vim: set ts=4 : */
   {
   	if (test)
@@ -1103,12 +1109,12 @@ func Test_cindent_1()
   /* end of AUTO */
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('start of AUTO')
+  search('start of AUTO')
   exe "normal =/end of AUTO\<CR>"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   /* start of AUTO matically checked vim: set ts=4 : */
   {
   	if (test)
@@ -2081,17 +2087,18 @@ func Test_cindent_1()
 
   [CODE]
 
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_2()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_2()
   new
   setl cindent ts=4 sw=4
   setl tw=0 noai fo=croq
-  let &wm = &columns - 20
-
-  let code =<< trim [CODE]
+  &wm = &columns - 20
+
+  var code =<< trim [CODE]
     {
   
     /* this is
@@ -2102,12 +2109,12 @@ func Test_cindent_2()
     }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('serious', 'e')
+  search('serious', 'e')
   normal a about life, the universe, and the rest
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   {
 
   /* this is
@@ -2122,16 +2129,17 @@ func Test_cindent_2()
 
   [CODE]
 
-  call assert_equal(expected, getline(1, '$'))
+  assert_equal(expected, getline(1, '$'))
   set wm&
-  enew! | close
-endfunc
-
-func Test_cindent_3()
+
+  bwipe!
+enddef
+
+def Test_cindent_3()
   new
   setl nocindent ts=4 sw=4
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   {
   	/*
   	 * Testing for comments, without 'cin' set
@@ -2149,18 +2157,18 @@ func Test_cindent_3()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('comments')
+  search('comments')
   normal joabout life
-  call search('happens')
+  search('happens')
   normal jothere
-  call search('below')
+  search('below')
   normal oline
-  call search('this')
+  search('this')
   normal Ohello
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   {
   	/*
   	 * Testing for comments, without 'cin' set
@@ -2183,15 +2191,16 @@ func Test_cindent_3()
 
   [CODE]
 
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_4()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_4()
   new
   setl cindent ts=4 sw=4
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   {
       var = this + that + vec[0] * vec[0]
   				      + vec[1] * vec[1]
@@ -2199,12 +2208,12 @@ func Test_cindent_4()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('vec2')
+  search('vec2')
   normal ==
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   {
       var = this + that + vec[0] * vec[0]
   				      + vec[1] * vec[1]
@@ -2213,16 +2222,17 @@ func Test_cindent_4()
 
   [CODE]
 
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_5()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_5()
   new
   setl cindent ts=4 sw=4
   setl cino=}4
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   {
   		asdf asdflkajds f;
   	if (tes & ting) {
@@ -2239,13 +2249,13 @@ func Test_cindent_5()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('testing1')
+  search('testing1')
   exe "normal k2==/testing2\<CR>"
   normal k2==
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   {
   		asdf asdflkajds f;
   	if (tes & ting) {
@@ -2263,16 +2273,17 @@ func Test_cindent_5()
 
   [CODE]
 
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_6()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_6()
   new
   setl cindent ts=4 sw=4
   setl cino=(0,)20
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   main ( int first_par, /*
                          * Comment for
                          * first par
@@ -2296,12 +2307,12 @@ func Test_cindent_6()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('main')
+  search('main')
   normal =][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   main ( int first_par, /*
   					   * Comment for
   					   * first par
@@ -2326,16 +2337,17 @@ func Test_cindent_6()
 
   [CODE]
 
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_7()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_7()
   new
   setl cindent ts=4 sw=4
   setl cino=es,n0s
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   main(void)
   {
   	/* Make sure that cino=X0s is not parsed like cino=Xs. */
@@ -2348,12 +2360,12 @@ func Test_cindent_7()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('main')
+  search('main')
   normal =][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   main(void)
   {
   	/* Make sure that cino=X0s is not parsed like cino=Xs. */
@@ -2366,17 +2378,17 @@ func Test_cindent_7()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_8()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_8()
   new
   setl cindent ts=4 sw=4
   setl cino=
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
 
   {
   	do
@@ -2393,11 +2405,11 @@ func Test_cindent_8()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
 
   {
   	do
@@ -2415,15 +2427,16 @@ func Test_cindent_8()
 
   [CODE]
 
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_9()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_9()
   new
   setl cindent ts=4 sw=4
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
 
   void f()
   {
@@ -2438,11 +2451,11 @@ func Test_cindent_9()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
 
   void f()
   {
@@ -2458,16 +2471,17 @@ func Test_cindent_9()
 
   [CODE]
 
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_10()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_10()
   new
   setl cindent ts=4 sw=4
   setl cino={s,e-s
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
 
   void f()
   {
@@ -2481,11 +2495,11 @@ func Test_cindent_10()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
 
   void f()
   {
@@ -2500,16 +2514,17 @@ func Test_cindent_10()
 
   [CODE]
 
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_11()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_11()
   new
   setl cindent ts=4 sw=4
   setl cino={s,fs
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void bar(void)
   {
   	static array[2][2] =
@@ -2544,11 +2559,11 @@ func Test_cindent_11()
   /* foo */
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   exe "normal ]]=/ foo\<CR>"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void bar(void)
   	{
   	static array[2][2] =
@@ -2583,17 +2598,17 @@ func Test_cindent_11()
   /* foo */
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_12()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_12()
   new
   setl cindent ts=4 sw=4
   setl cino=
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   a()
   {
     do {
@@ -2605,12 +2620,12 @@ func Test_cindent_12()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('while')
+  search('while')
   normal ohere
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   a()
   {
     do {
@@ -2623,17 +2638,17 @@ func Test_cindent_12()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_13()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_13()
   new
   setl cindent ts=4 sw=4
   setl cino= com=
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   a()
   {
   label1:
@@ -2642,13 +2657,13 @@ func Test_cindent_13()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('comment')
-  exe "normal olabel2: b();\rlabel3 /* post */:\r/* pre */ label4:\r" .
-        \ "f(/*com*/);\rif (/*com*/)\rcmd();"
-
-  let expected =<< trim [CODE]
+  search('comment')
+  exe "normal olabel2: b();\rlabel3 /* post */:\r/* pre */ label4:\r"
+        .. "f(/*com*/);\rif (/*com*/)\rcmd();"
+
+  var expected =<< trim [CODE]
   a()
   {
   label1:
@@ -2663,17 +2678,17 @@ func Test_cindent_13()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_14()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_14()
   new
   setl cindent ts=4 sw=4
   setl comments& comments^=s:/*,m:**,ex:*/
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   /*
     * A simple comment
      */
@@ -2683,12 +2698,12 @@ func Test_cindent_14()
      */
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('simple')
+  search('simple')
   normal =5j
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   /*
    * A simple comment
    */
@@ -2698,18 +2713,18 @@ func Test_cindent_14()
   */
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_15()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_15()
   new
   setl cindent ts=4 sw=4
   setl cino=c0
   setl comments& comments-=s1:/* comments^=s0:/*
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
 
@@ -2719,11 +2734,11 @@ func Test_cindent_15()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
 
@@ -2733,18 +2748,18 @@ func Test_cindent_15()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_16()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_16()
   new
   setl cindent ts=4 sw=4
   setl cino=c0,C1
   setl comments& comments-=s1:/* comments^=s0:/*
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
 
@@ -2754,11 +2769,11 @@ func Test_cindent_16()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
 
@@ -2768,17 +2783,17 @@ func Test_cindent_16()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_17()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_17()
   new
   setl cindent ts=4 sw=4
   setl cino=
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	c = c1 &&
@@ -2789,11 +2804,11 @@ func Test_cindent_17()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	c = c1 &&
@@ -2804,17 +2819,17 @@ func Test_cindent_17()
   }
 
   [CODE]
-
   call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_18()
+
+  bwipe!
+enddef
+
+def Test_cindent_18()
   new
   setl cindent ts=4 sw=4
   setl cino=(s
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	c = c1 &&
@@ -2825,11 +2840,11 @@ func Test_cindent_18()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	c = c1 &&
@@ -2840,17 +2855,17 @@ func Test_cindent_18()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_19()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_19()
   new
   setl cindent ts=4 sw=4
   set cino=(s,U1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	c = c1 &&
@@ -2861,11 +2876,11 @@ func Test_cindent_19()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	c = c1 &&
@@ -2876,17 +2891,17 @@ func Test_cindent_19()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_20()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_20()
   new
   setl cindent ts=4 sw=4
   setl cino=(0
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	if (   c1
@@ -2896,11 +2911,11 @@ func Test_cindent_20()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	if (   c1
@@ -2910,17 +2925,17 @@ func Test_cindent_20()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_21()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_21()
   new
   setl cindent ts=4 sw=4
   setl cino=(0,w1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	if (   c1
@@ -2930,11 +2945,11 @@ func Test_cindent_21()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	if (   c1
@@ -2944,17 +2959,17 @@ func Test_cindent_21()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_22()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_22()
   new
   setl cindent ts=4 sw=4
   setl cino=(s
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	c = c1 && (
@@ -2968,11 +2983,11 @@ func Test_cindent_22()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	c = c1 && (
@@ -2986,17 +3001,17 @@ func Test_cindent_22()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_23()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_23()
   new
   setl cindent ts=4 sw=4
   setl cino=(s,m1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	c = c1 && (
@@ -3010,11 +3025,11 @@ func Test_cindent_23()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	c = c1 && (
@@ -3028,17 +3043,17 @@ func Test_cindent_23()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_24()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_24()
   new
   setl cindent ts=4 sw=4
   setl cino=b1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	switch (x)
@@ -3053,11 +3068,11 @@ func Test_cindent_24()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	switch (x)
@@ -3072,17 +3087,17 @@ func Test_cindent_24()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_25()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_25()
   new
   setl cindent ts=4 sw=4
   setl cino=(0,W5
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	invokeme(
@@ -3098,11 +3113,11 @@ func Test_cindent_25()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	invokeme(
@@ -3118,17 +3133,17 @@ func Test_cindent_25()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_26()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_26()
   new
   setl cindent ts=4 sw=4
   setl cino=/6
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	statement;
@@ -3137,11 +3152,11 @@ func Test_cindent_26()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	statement;
@@ -3150,17 +3165,17 @@ func Test_cindent_26()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_27()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_27()
   new
   setl cindent ts=4 sw=4
   setl cino=
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void f()
   {
   	statement;
@@ -3169,11 +3184,11 @@ func Test_cindent_27()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   exe "normal ]]/comment 1/+1\<CR>=="
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void f()
   {
   	statement;
@@ -3182,17 +3197,17 @@ func Test_cindent_27()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_28()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_28()
   new
   setl cindent ts=4 sw=4
   setl cino=g0
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   class CAbc
   {
      int Test() { return FALSE; }
@@ -3204,11 +3219,11 @@ func Test_cindent_28()
   };
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   class CAbc
   {
   	int Test() { return FALSE; }
@@ -3220,17 +3235,17 @@ func Test_cindent_28()
   };
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_29()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_29()
   new
   setl cindent ts=4 sw=4
   setl cino=(0,gs,hs
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   class Foo : public Bar
   {
   public:
@@ -3241,11 +3256,11 @@ func Test_cindent_29()
   };
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   class Foo : public Bar
   {
   	public:
@@ -3256,17 +3271,17 @@ func Test_cindent_29()
   };
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_30()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_30()
   new
   setl cindent ts=4 sw=4
   setl cino=+20
 
-  let code =<< [CODE]
+  var code =<< [CODE]
 	void
 foo()
 {
@@ -3277,11 +3292,11 @@ foo()
 }
 [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< [CODE]
+  var expected =<< [CODE]
 	void
 foo()
 {
@@ -3292,17 +3307,17 @@ foo()
 }
 
 [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_31()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_31()
   new
   setl cindent ts=4 sw=4
   setl cino=(0,W2s
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
 
   {
      averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd(
@@ -3342,11 +3357,11 @@ func Test_cindent_31()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
 
   {
   	averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd(
@@ -3386,17 +3401,17 @@ func Test_cindent_31()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_32()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_32()
   new
   setl cindent ts=4 sw=4
   setl cino=M1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   int main ()
   {
   	if (cond1 &&
@@ -3406,11 +3421,11 @@ func Test_cindent_32()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   int main ()
   {
   	if (cond1 &&
@@ -3420,17 +3435,17 @@ func Test_cindent_32()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_33()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_33()
   new
   setl cindent ts=4 sw=4
   setl cino=(0,ts
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(int a
   #if defined(FOO)
   		  , int b
@@ -3441,11 +3456,11 @@ func Test_cindent_33()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal 2j=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(int a
   #if defined(FOO)
   		  , int b
@@ -3456,17 +3471,17 @@ func Test_cindent_33()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_34()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_34()
   new
   setl cindent ts=4 sw=4
   setl cino=(0
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
 
   void
   func(int a
@@ -3479,11 +3494,11 @@ func Test_cindent_34()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal =][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   
   	void
   func(int a
@@ -3496,17 +3511,17 @@ func Test_cindent_34()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_35()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_35()
   new
   setl cindent ts=4 sw=4
   setl cino&
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	if(x==y)
@@ -3579,11 +3594,11 @@ func Test_cindent_35()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=7][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	if(x==y)
@@ -3656,18 +3671,18 @@ func Test_cindent_35()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_36()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_36()
   new
   setl cindent ts=4 sw=4
   setl cino&
   setl cino+=l1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	int tab[] =
@@ -3693,11 +3708,11 @@ func Test_cindent_36()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	int tab[] =
@@ -3723,17 +3738,17 @@ func Test_cindent_36()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_37()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_37()
   new
   setl cindent ts=4 sw=4
   setl cino&
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	cout << "a"
@@ -3743,11 +3758,11 @@ func Test_cindent_37()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	cout << "a"
@@ -3757,17 +3772,17 @@ func Test_cindent_37()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_38()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_38()
   new
   setl cindent ts=4 sw=4
   setl com=s1:/*,m:*,ex:*/
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	/*
@@ -3776,11 +3791,11 @@ func Test_cindent_38()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]3jofoo();
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	/*
@@ -3790,17 +3805,17 @@ func Test_cindent_38()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_39()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_39()
   new
   setl cindent ts=4 sw=4
   setl cino&
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	for (int i = 0; i < 10; ++i)
@@ -3812,11 +3827,11 @@ func Test_cindent_39()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	for (int i = 0; i < 10; ++i)
@@ -3828,17 +3843,17 @@ func Test_cindent_39()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_40()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_40()
   new
   setl cindent ts=4 sw=4
   setl cino=k2s,(0
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -3866,11 +3881,11 @@ func Test_cindent_40()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -3898,17 +3913,17 @@ func Test_cindent_40()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_41()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_41()
   new
   setl cindent ts=4 sw=4
   setl cino=k2s,(s
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -3936,11 +3951,11 @@ func Test_cindent_41()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -3968,17 +3983,17 @@ func Test_cindent_41()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_42()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_42()
   new
   setl cindent ts=4 sw=4
   setl cino=k2s,(s,U1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4007,11 +4022,11 @@ func Test_cindent_42()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4040,17 +4055,17 @@ func Test_cindent_42()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_43()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_43()
   new
   setl cindent ts=4 sw=4
   setl cino=k2s,(0,W4
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4084,11 +4099,11 @@ func Test_cindent_43()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4122,17 +4137,17 @@ func Test_cindent_43()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_44()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_44()
   new
   setl cindent ts=4 sw=4
   setl cino=k2s,u2
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4155,11 +4170,11 @@ func Test_cindent_44()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4182,17 +4197,17 @@ func Test_cindent_44()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_45()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_45()
   new
   setl cindent ts=4 sw=4
   setl cino=k2s,(0,w1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4224,11 +4239,11 @@ func Test_cindent_45()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4260,17 +4275,17 @@ func Test_cindent_45()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_46()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_46()
   new
   setl cindent ts=4 sw=4
   setl cino=k2,(s
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4289,11 +4304,11 @@ func Test_cindent_46()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   void func(void)
   {
   	if (condition1
@@ -4312,17 +4327,17 @@ func Test_cindent_46()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_47()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_47()
   new
   setl cindent ts=4 sw=4
   setl cino=N-s
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   NAMESPACESTART
   /* valid namespaces with normal indent */
   namespace
@@ -4420,12 +4435,12 @@ func Test_cindent_47()
   NAMESPACEEND
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   call search('^NAMESPACESTART')
   exe "normal =/^NAMESPACEEND\n"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   NAMESPACESTART
   /* valid namespaces with normal indent */
   namespace
@@ -4523,17 +4538,17 @@ func Test_cindent_47()
   NAMESPACEEND
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_48()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_48()
   new
   setl cindent ts=4 sw=4
   setl cino=j1,J1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   JSSTART
   var bar = {
   foo: {
@@ -4550,12 +4565,12 @@ func Test_cindent_48()
   JSEND
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('^JSSTART')
+  search('^JSSTART')
   exe "normal =/^JSEND\n"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   JSSTART
   var bar = {
   	foo: {
@@ -4572,17 +4587,17 @@ func Test_cindent_48()
   JSEND
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_49()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_49()
   new
   setl cindent ts=4 sw=4
   setl cino=j1,J1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   JSSTART
   var foo = [
   1,
@@ -4592,12 +4607,12 @@ func Test_cindent_49()
   JSEND
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('^JSSTART')
+  search('^JSSTART')
   exe "normal =/^JSEND\n"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   JSSTART
   var foo = [
   	1,
@@ -4607,17 +4622,17 @@ func Test_cindent_49()
   JSEND
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_50()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_50()
   new
   setl cindent ts=4 sw=4
   setl cino=j1,J1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   JSSTART
   function bar() {
   var foo = [
@@ -4629,12 +4644,12 @@ func Test_cindent_50()
   JSEND
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('^JSSTART')
+  search('^JSSTART')
   exe "normal =/^JSEND\n"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   JSSTART
   function bar() {
   	var foo = [
@@ -4646,17 +4661,17 @@ func Test_cindent_50()
   JSEND
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_51()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_51()
   new
   setl cindent ts=4 sw=4
   setl cino=j1,J1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   JSSTART
   (function($){
 
@@ -4719,12 +4734,12 @@ func Test_cindent_51()
   JSEND
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('^JSSTART')
+  search('^JSSTART')
   exe "normal =/^JSEND\n"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   JSSTART
   (function($){
 
@@ -4787,17 +4802,17 @@ func Test_cindent_51()
   JSEND
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_52()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_52()
   new
   setl cindent ts=4 sw=4
   setl cino=j1,J1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   JSSTART
   function init(options) {
   $(this).data(class_name+'_public',$.extend({},{
@@ -4816,12 +4831,12 @@ func Test_cindent_52()
   JSEND
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('^JSSTART')
+  search('^JSSTART')
   exe "normal =/^JSEND\n"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   JSSTART
   function init(options) {
   	$(this).data(class_name+'_public',$.extend({},{
@@ -4840,17 +4855,17 @@ func Test_cindent_52()
   JSEND
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_53()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_53()
   new
   setl cindent ts=4 sw=4
   setl cino=j1,J1
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   JSSTART
   (function($){
   function init(options) {
@@ -4871,12 +4886,12 @@ func Test_cindent_53()
   JSEND
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('^JSSTART')
+  search('^JSSTART')
   exe "normal =/^JSEND\n"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   JSSTART
   (function($){
   	function init(options) {
@@ -4897,17 +4912,17 @@ func Test_cindent_53()
   JSEND
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_54()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_54()
   new
   setl cindent ts=4 sw=4
   setl cino=j1,J1,+2
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   JSSTART
   // Results of JavaScript indent
   // 1
@@ -5061,12 +5076,12 @@ func Test_cindent_54()
   JSEND
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('^JSSTART')
+  search('^JSSTART')
   exe "normal =/^JSEND\n"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   JSSTART
   // Results of JavaScript indent
   // 1
@@ -5220,17 +5235,17 @@ func Test_cindent_54()
   JSEND
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_55()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_55()
   new
   setl cindent ts=4 sw=4
   setl cino&
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   /* start of define */
   {
   }
@@ -5245,12 +5260,12 @@ func Test_cindent_55()
   /* end of define */
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('start of define')
+  search('start of define')
   exe "normal =/end of define\n"
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   /* start of define */
   {
   }
@@ -5265,74 +5280,74 @@ func Test_cindent_55()
   /* end of define */
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_56()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_56()
   new
   setl cindent ts=4 sw=4
   setl cino&
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   {
   	a = second/*bug*/*line;
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
-  call search('a = second')
+  search('a = second')
   normal ox
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   {
   	a = second/*bug*/*line;
   	x
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
 
 " this was going beyond the end of the line.
-func Test_cindent_case()
+def Test_cindent_case()
   new
-  call setline(1, 'case x: // x')
+  setline(1, 'case x: // x')
   set cindent
   norm! f:a:
-  call assert_equal('case x:: // x', getline(1))
+  assert_equal('case x:: // x', getline(1))
   set cindent&
   bwipe!
-endfunc
+enddef
 
 " Test for changing multiple lines (using c) with cindent
-func Test_cindent_change_multline()
+def Test_cindent_change_multline()
   new
   setlocal cindent
-  call setline(1, ['if (a)', '{', '    i = 1;', '}'])
+  setline(1, ['if (a)', '{', '    i = 1;', '}'])
   normal! jc3jm = 2;
-  call assert_equal("\tm = 2;", getline(2))
-  close!
-endfunc
+  assert_equal("\tm = 2;", getline(2))
+  bwipe!
+enddef
 
 " This was reading past the end of the line
-func Test_cindent_check_funcdecl()
+def Test_cindent_check_funcdecl()
   new
   sil norm o0('\0=L
   bwipe!
-endfunc
-
-func Test_cindent_scopedecls()
+enddef
+
+def Test_cindent_scopedecls()
   new
   setl cindent ts=4 sw=4
   setl cino=g0
   setl cinsd+=public\ slots,signals
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   class Foo
   {
   public:
@@ -5346,11 +5361,11 @@ func Test_cindent_scopedecls()
   };
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal ]]=][
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   class Foo
   {
   public:
@@ -5364,17 +5379,17 @@ func Test_cindent_scopedecls()
   };
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_cindent_pragma()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_cindent_pragma()
   new
   setl cindent ts=4 sw=4
   setl cino=Ps
 
-  let code =<< trim [CODE]
+  var code =<< trim [CODE]
   {
   #pragma omp parallel
   {
@@ -5385,11 +5400,11 @@ func Test_cindent_pragma()
   }
   [CODE]
 
-  call append(0, code)
+  append(0, code)
   normal gg
   normal =G
 
-  let expected =<< trim [CODE]
+  var expected =<< trim [CODE]
   {
 	#pragma omp parallel
 	{
@@ -5400,28 +5415,28 @@ func Test_cindent_pragma()
   }
 
   [CODE]
-
-  call assert_equal(expected, getline(1, '$'))
-  enew! | close
-endfunc
-
-func Test_backslash_at_end_of_line()
+  assert_equal(expected, getline(1, '$'))
+
+  bwipe!
+enddef
+
+def Test_backslash_at_end_of_line()
   new
   exe "norm v>O'\\\<C-m>-"
   exe "norm \<C-q>="
   bwipe!
-endfunc
-
-func Test_find_brace_backwards()
-  " this was looking beyond the end of the line
+enddef
+
+def Test_find_brace_backwards()
+  # this was looking beyond the end of the line
   new
   norm R/*
   norm o0{
   norm o//
   norm V{=
-  call assert_equal(['/*', '   0{', '//'], getline(1, 3))
+  assert_equal(['/*', '   0{', '//'], getline(1, 3))
   bwipe!
-endfunc
+enddef
 
 
 " vim: shiftwidth=2 sts=2 expandtab
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4994,
+/**/
     4993,
 /**/
     4992,