diff src/testdir/test_vim9_func.vim @ 24685:04205b7d67d5 v8.2.2881

patch 8.2.2881: various pieces of code not covered by tests Commit: https://github.com/vim/vim/commit/611728f80604dd56960e8c197e5749d203c8feb1 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon May 24 15:15:47 2021 +0200 patch 8.2.2881: various pieces of code not covered by tests Problem: Various pieces of code not covered by tests. Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/8245)
author Bram Moolenaar <Bram@vim.org>
date Mon, 24 May 2021 15:30:03 +0200
parents 5dea95170907
children 13efbfc53054
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -887,6 +887,12 @@ def Test_lambda_return_type()
   END
   CheckDefAndScriptFailure(lines, 'E1157:', 1)
 
+  # no space before the return type
+  lines =<< trim END
+    var Ref = (x):number => x + 1
+  END
+  CheckDefAndScriptFailure(lines, 'E1069:', 1)
+
   # this works
   for x in ['foo', 'boo']
     echo FilterWithCond(x, (v) => v =~ '^b')
@@ -1318,6 +1324,7 @@ def Test_white_space_before_comma()
     enddef
   END
   CheckScriptFailure(lines, 'E1068:')
+  call assert_fails('vim9cmd echo stridx("a" .. "b" , "a")', 'E1068:')
 enddef
 
 def Test_white_space_after_comma()