diff src/testdir/test_execute_func.vim @ 24822:5f8dd7b3ae41 v8.2.2949

patch 8.2.2949: tests failing because no error for float to string conversion Commit: https://github.com/vim/vim/commit/3cfa5b16b06bcc034f6de77070fa779d698ab5e9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 6 14:14:39 2021 +0200 patch 8.2.2949: tests failing because no error for float to string conversion Problem: Tests failing because there is no error for float to string conversion. Solution: Change the check for failure to check for correct result. Make some conversions strict in Vim9 script.
author Bram Moolenaar <Bram@vim.org>
date Sun, 06 Jun 2021 14:15:04 +0200
parents 9fa72351c18f
children 2d4cef0a8faa
line wrap: on
line diff
--- a/src/testdir/test_execute_func.vim
+++ b/src/testdir/test_execute_func.vim
@@ -2,6 +2,7 @@
 
 source view_util.vim
 source check.vim
+source vim9.vim
 
 func NestedEval()
   let nested = execute('echo "nested\nlines"')
@@ -37,8 +38,9 @@ func Test_execute_string()
   call assert_equal("\nsomething", execute('echo "something"', 'silent!'))
   call assert_equal("", execute('burp', 'silent!'))
   if has('float')
-    call assert_fails('call execute(3.4)', 'E806:')
-    call assert_fails('call execute("echo \"x\"", 3.4)', 'E806:')
+    call assert_fails('call execute(3.4)', 'E492:')
+    call assert_equal("\nx", execute("echo \"x\"", 3.4))
+    call CheckDefExecAndScriptFailure(['execute("echo \"x\"", 3.4)'], 'E806:')
   endif
 endfunc