aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_execute_func.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_execute_func.vim')
-rw-r--r--test/old/testdir/test_execute_func.vim9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/old/testdir/test_execute_func.vim b/test/old/testdir/test_execute_func.vim
index cc294b7316..61971ec587 100644
--- a/test/old/testdir/test_execute_func.vim
+++ b/test/old/testdir/test_execute_func.vim
@@ -1,6 +1,8 @@
" test execute()
source view_util.vim
+source check.vim
+source vim9.vim
func NestedEval()
let nested = execute('echo "nested\nlines"')
@@ -31,7 +33,6 @@ func Test_execute_string()
call assert_equal("\nthat", evaled)
call assert_fails('call execute("doesnotexist")', 'E492:')
- call assert_fails('call execute(3.4)', 'E806:')
" Nvim supports execute('... :redir ...'), so this test is intentionally
" disabled.
" call assert_fails('call execute("call NestedRedir()")', 'E930:')
@@ -40,7 +41,11 @@ func Test_execute_string()
call assert_equal("\nsomething", execute('echo "something"', 'silent'))
call assert_equal("\nsomething", execute('echo "something"', 'silent!'))
call assert_equal("", execute('burp', 'silent!'))
- call assert_fails('call execute("echo \"x\"", 3.4)', 'E806:')
+ if has('float')
+ 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
func Test_execute_list()