diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-12 21:22:31 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-12 21:22:31 +0100 |
commit | 64ed4d4398e92ac56a9bbd66d5ec992dd4c335f7 (patch) | |
tree | 4c44133ad50b219b2b2cf34d82eb7f787717dd7c /src/testdir/test_vim9_builtin.vim | |
parent | 67876de7bbc4254268d8180d68203b965e25ed95 (diff) |
patch 8.2.2338: Vim9: no error if using job_info() result wronglyv8.2.2338
Problem: Vim9: no error if using job_info() result wrongly.
Solution: Adjust return type on number of arguments. (closes #7667)
Diffstat (limited to 'src/testdir/test_vim9_builtin.vim')
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index c867266c2d..83b9931f24 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -314,6 +314,16 @@ def Test_extend_list_item_type() CheckScriptFailure(['vim9script'] + lines, 'E1012:', 1) enddef +def Test_job_info_return_type() + if has('job') + job_start(&shell) + var jobs = job_info() + assert_equal(v:t_list, type(jobs)) + assert_equal(v:t_dict, type(job_info(jobs[0]))) + job_stop(jobs[0]) + endif +enddef + def Wrong_dict_key_type(items: list<number>): list<number> return filter(items, (_, val) => get({[val]: 1}, 'x')) enddef |