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_partial_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_partial_spec.lua')
-rw-r--r-- | test/functional/core/job_partial_spec.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/core/job_partial_spec.lua b/test/functional/core/job_partial_spec.lua new file mode 100644 index 0000000000..b60f239db9 --- /dev/null +++ b/test/functional/core/job_partial_spec.lua @@ -0,0 +1,27 @@ +local helpers = require('test.functional.helpers')(after_each) +local clear, eq, next_msg, nvim, source = helpers.clear, helpers.eq, + helpers.next_message, helpers.nvim, helpers.source + +if helpers.pending_win32(pending) then return end + +describe('jobs with partials', function() + local channel + + before_each(function() + clear() + channel = nvim('get_api_info')[1] + nvim('set_var', 'channel', channel) + end) + + it('works correctly', function() + source([[ + function PrintArgs(a1, a2, id, data, event) + call rpcnotify(g:channel, '1', a:a1, a:a2, a:data, a:event) + endfunction + let Callback = function('PrintArgs', ["foo", "bar"]) + let g:job_opts = {'on_stdout': Callback} + call jobstart(['echo'], g:job_opts) + ]]) + eq({'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}}, next_msg()) + end) +end) |