diff src/testdir/test_functions.vim @ 25094:99494ef94fc2 v8.2.3084

patch 8.2.3084: Vim9: builtin function argument types are not checked Commit: https://github.com/vim/vim/commit/a26f56f67502c72d44c61afdede2206cdde47c17 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Jul 3 11:58:12 2021 +0200 patch 8.2.3084: Vim9: builtin function argument types are not checked Problem: Vim9: builtin function argument types are not checked at compile time. Solution: Add argument types. (Yegappan Lakshmanan, closes #8503)
author Bram Moolenaar <Bram@vim.org>
date Sat, 03 Jul 2021 12:00:05 +0200
parents cd5e8df05a64
children 11ed1f0adb01
line wrap: on
line diff
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -169,7 +169,8 @@ func Test_strwidth()
 
   if has('float')
     call assert_equal(3, strwidth(1.2))
-    call CheckDefExecAndScriptFailure(['echo strwidth(1.2)'], 'E806:')
+    call CheckDefFailure(['echo strwidth(1.2)'], 'E1013:')
+    call CheckScriptFailure(['vim9script', 'echo strwidth(1.2)'], 'E806:')
   endif
 
   set ambiwidth&
@@ -236,7 +237,7 @@ func Test_str2nr()
   call assert_fails('call str2nr({->2})', 'E729:')
   if has('float')
     call assert_equal(1, str2nr(1.2))
-    call CheckDefExecFailure(['echo str2nr(1.2)'], 'E1013:')
+    call CheckDefFailure(['echo str2nr(1.2)'], 'E1013:')
     call CheckScriptFailure(['vim9script', 'echo str2nr(1.2)'], 'E806:')
   endif
   call assert_fails('call str2nr(10, [])', 'E745:')
@@ -499,7 +500,8 @@ func Test_simplify()
   call assert_fails('call simplify({})', 'E731:')
   if has('float')
     call assert_equal('1.2', simplify(1.2))
-    call CheckDefExecAndScriptFailure(['echo simplify(1.2)'], 'E806:')
+    call CheckDefFailure(['echo simplify(1.2)'], 'E1013:')
+    call CheckScriptFailure(['vim9script', 'echo simplify(1.2)'], 'E806:')
   endif
 endfunc