diff options
| author | Björn Linse <bjorn.linse@gmail.com> | 2016-11-01 10:54:32 +0100 |
|---|---|---|
| committer | James McCoy <jamessan@jamessan.com> | 2016-12-12 10:17:35 -0500 |
| commit | 0f681c80e1e9c9060394365dae12f8ebd5736176 (patch) | |
| tree | b5e2e6ddb9d45da26a14d78e09cd5f6ee56743fa /test/functional/core | |
| parent | a21c687661eac61702fe492264a3c9036bc62f41 (diff) | |
| download | rneovim-0f681c80e1e9c9060394365dae12f8ebd5736176.tar.gz rneovim-0f681c80e1e9c9060394365dae12f8ebd5736176.tar.bz2 rneovim-0f681c80e1e9c9060394365dae12f8ebd5736176.zip | |
Make partials work with jobs, timers, and dictwatchers.
Diffstat (limited to 'test/functional/core')
| -rw-r--r-- | test/functional/core/job_spec.lua | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 79cc877cac..34085fa522 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -18,7 +18,7 @@ describe('jobs', function() channel = nvim('get_api_info')[1] nvim('set_var', 'channel', channel) source([[ - function! s:OnEvent(id, data, event) + function! s:OnEvent(id, data, event) dict let userdata = get(self, 'user') call rpcnotify(g:channel, a:event, userdata, a:data) endfunction @@ -265,9 +265,12 @@ describe('jobs', function() eq({'notification', 'exit', {45, 10}}, next_msg()) end) - it('cannot redefine callbacks being used by a job', function() + it('can redefine callbacks being used by a job', function() local screen = Screen.new() screen:attach() + screen:set_default_attr_ids({ + [1] = {bold=true, foreground=Screen.colors.Blue}, + }) local script = [[ function! g:JobHandler(job_id, data, event) endfunction @@ -283,20 +286,20 @@ describe('jobs', function() feed(':function! g:JobHandler(job_id, data, event)<cr>') feed(':endfunction<cr>') screen:expect([[ - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - :function! g:JobHandler(job_id, data, event) | - : :endfunction | - E127: Cannot redefine function JobHandler: It is in u| - se | - Press ENTER or type command to continue^ | + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | ]]) end) @@ -317,7 +320,7 @@ describe('jobs', function() source([[ let g:dict = {'id': 10} let g:exits = 0 - function g:dict.on_exit(id, code) + function g:dict.on_exit(id, code, event) if a:code != 5 throw 'Error!' endif @@ -365,7 +368,7 @@ describe('jobs', function() eq({'notification', 'wait', {{-2}}}, next_msg()) end) - it('can be called recursively', function() + pending('can be called recursively', function() source([[ let g:opts = {} let g:counter = 0 |