summaryrefslogtreecommitdiff
path: root/src/testdir/test_execute_func.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-08 19:32:18 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-08 19:32:18 +0100
commite2a8f0773e91685843c062b1e48259712d5f2213 (patch)
treeb661b7284f61ee607bbb0a2576b398ddb86fc13b /src/testdir/test_execute_func.vim
parentda292b07afb7ea5ec9f4b43a7326551922e29f3a (diff)
downloadvim-git-e2a8f0773e91685843c062b1e48259712d5f2213.tar.gz
patch 8.2.0103: using null object with execute() has strange effectsv8.2.0103
Problem: Using null object with execute() has strange effects. Solution: Give an error message ofr Job and Channel.
Diffstat (limited to 'src/testdir/test_execute_func.vim')
-rw-r--r--src/testdir/test_execute_func.vim15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/testdir/test_execute_func.vim b/src/testdir/test_execute_func.vim
index 7934e6084..30dcb6202 100644
--- a/src/testdir/test_execute_func.vim
+++ b/src/testdir/test_execute_func.vim
@@ -38,8 +38,6 @@ func Test_execute_string()
call assert_equal("\nsomething", execute('echo "something"', 'silent!'))
call assert_equal("", execute('burp', 'silent!'))
call assert_fails('call execute("echo \"x\"", 3.4)', 'E806:')
-
- call assert_equal("", execute(test_null_string()))
endfunc
func Test_execute_list()
@@ -50,7 +48,6 @@ func Test_execute_list()
call assert_equal("\n0\n1\n2\n3", execute(l))
call assert_equal("", execute([]))
- call assert_equal("", execute(test_null_list()))
endfunc
func Test_execute_does_not_change_col()
@@ -132,3 +129,15 @@ func Test_win_execute_other_tab()
tabclose
unlet xyz
endfunc
+
+func Test_execute_null()
+ call assert_equal("", execute(test_null_string()))
+ call assert_equal("", execute(test_null_list()))
+ call assert_fails('call execute(test_null_dict())', 'E731:')
+ call assert_fails('call execute(test_null_blob())', 'E976:')
+ call assert_fails('call execute(test_null_partial())','E729:')
+ if has('job')
+ call assert_fails('call execute(test_null_job())', 'E908:')
+ call assert_fails('call execute(test_null_channel())', 'E908:')
+ endif
+endfunc