diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-12-15 06:40:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-15 06:40:55 +0100 |
commit | 02a9824438adb89eed8b0230068bb95bbf7ce97c (patch) | |
tree | 98e15d480351d39e90bb1c5f2102ee22d58da95b /test/functional/core/job_spec.lua | |
parent | f089d299e33e9f5d1a52aa6d3b9c1ea43bb2e51c (diff) | |
parent | b29c5dd3848d3621dfbb00f8f940506cc1048fd1 (diff) | |
download | rneovim-02a9824438adb89eed8b0230068bb95bbf7ce97c.tar.gz rneovim-02a9824438adb89eed8b0230068bb95bbf7ce97c.tar.bz2 rneovim-02a9824438adb89eed8b0230068bb95bbf7ce97c.zip |
Merge #5772 from justinmk/fixsegfault
eval.c: set_selfdict(): Fix invalid memory access.
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r-- | test/functional/core/job_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index fa38671529..e27adc1a51 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -303,6 +303,26 @@ describe('jobs', function() ]]) end) + it('requires funcrefs for script-local (s:) functions', function() + -- Pass job callback names _without_ `function(...)`. + source([[ + function! s:OnEvent(id, data, event) dict + let g:job_result = get(self, 'user') + endfunction + let s:job = jobstart(['echo'], { + \ 'on_stdout': 's:OnEvent', + \ 'on_stderr': 's:OnEvent', + \ 'on_exit': 's:OnEvent', + \ 'user': 2349 + \ }) + ]]) + + -- The behavior is asynchronous, retry until a time limit. + helpers.retry(nil, 10000, function() + eq("E120:", string.match(eval("v:errmsg"), "E%d*:")) + end) + end) + describe('jobwait', function() it('returns a list of status codes', function() source([[ |