diff options
author | James McCoy <jamessan@jamessan.com> | 2016-12-12 10:53:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-12 10:53:32 -0500 |
commit | 988ab5804a16beafff26b487b0612cb7cf97ea09 (patch) | |
tree | e31b25acaf30023616d4f469af5d067befd30556 /test/functional/core/job_spec.lua | |
parent | 75c18b6aaa8430596fa10466dc7918047b13ff2b (diff) | |
parent | 5e4eb18eb0242794c0b3a622f7acf0d3e6856c05 (diff) | |
download | rneovim-988ab5804a16beafff26b487b0612cb7cf97ea09.tar.gz rneovim-988ab5804a16beafff26b487b0612cb7cf97ea09.tar.bz2 rneovim-988ab5804a16beafff26b487b0612cb7cf97ea09.zip |
Merge pull request #5529 from brcolow/vim-7.4.1559
Port partial patches from vim
Diffstat (limited to 'test/functional/core/job_spec.lua')
-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 |