aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-15 13:10:36 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-04-15 13:15:10 +0800
commit4c276bbd1887c09350fca4bdb355a2afde3ef471 (patch)
tree87e905f8b0f09576ab55db25c804bd3227c270fd /test/old/testdir
parentd372eedcfa8cae3b20853bfb1489ec8beb825e94 (diff)
downloadrneovim-4c276bbd1887c09350fca4bdb355a2afde3ef471.tar.gz
rneovim-4c276bbd1887c09350fca4bdb355a2afde3ef471.tar.bz2
rneovim-4c276bbd1887c09350fca4bdb355a2afde3ef471.zip
vim-patch:8.2.0103: using null object with execute() has strange effects
Problem: Using null object with execute() has strange effects. Solution: Give an error message ofr Job and Channel. https://github.com/vim/vim/commit/e2a8f0773e91685843c062b1e48259712d5f2213 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old/testdir')
-rw-r--r--test/old/testdir/test_execute_func.vim16
1 files changed, 13 insertions, 3 deletions
diff --git a/test/old/testdir/test_execute_func.vim b/test/old/testdir/test_execute_func.vim
index 16cc20e9a7..171cea1e49 100644
--- a/test/old/testdir/test_execute_func.vim
+++ b/test/old/testdir/test_execute_func.vim
@@ -41,8 +41,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(""))
endfunc
func Test_execute_list()
@@ -53,7 +51,6 @@ func Test_execute_list()
call assert_equal("\n0\n1\n2\n3", execute(l))
call assert_equal("", execute([]))
- call assert_equal("", execute(v:_null_list))
endfunc
func Test_execute_does_not_change_col()
@@ -173,4 +170,17 @@ func Test_win_execute_visual_redraw()
bwipe!
endfunc
+func Test_execute_null()
+ call assert_equal("", execute(v:_null_string))
+ call assert_equal("", execute(v:_null_list))
+ call assert_fails('call execute(v:_null_dict)', 'E731:')
+ call assert_fails('call execute(v:_null_blob)', 'E976:')
+ " Nvim doesn't have null partials
+ " 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
+
" vim: shiftwidth=2 sts=2 expandtab