diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2016-12-14 16:56:00 +0100 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2016-12-14 20:52:18 +0100 |
| commit | 43ba7f4d987fc491de3378eef6b246a697c6e0b0 (patch) | |
| tree | 6ddaa9431640ec0f4767449942b31697963ec8d3 /test/functional/core | |
| parent | 8c9cccbcb6bb5ee803f308916d5de1b949e0b13c (diff) | |
| download | rneovim-43ba7f4d987fc491de3378eef6b246a697c6e0b0.tar.gz rneovim-43ba7f4d987fc491de3378eef6b246a697c6e0b0.tar.bz2 rneovim-43ba7f4d987fc491de3378eef6b246a697c6e0b0.zip | |
eval.c: set_selfdict(): Fix invalid memory access.
Diffstat (limited to 'test/functional/core')
| -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([[ |