mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Add some tests and cleanup.
This commit is contained in:
parent
0f681c80e1
commit
5e4eb18eb0
@ -418,7 +418,7 @@ if(NOT BUSTED_OUTPUT_TYPE)
|
||||
if(WIN32)
|
||||
set(BUSTED_OUTPUT_TYPE "plainTerminal")
|
||||
else()
|
||||
set(BUSTED_OUTPUT_TYPE "gtest")
|
||||
set(BUSTED_OUTPUT_TYPE "utfTerminal")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
*eval.txt* For Vim version 7.4. Last change: 2016 Jun 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
|
@ -9664,7 +9664,7 @@ static void f_function(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
}
|
||||
if (arg_idx > 0) {
|
||||
if (argvars[arg_idx].v_type != VAR_LIST) {
|
||||
EMSG(_("E923: Second argument of function() must be"
|
||||
EMSG(_("E923: Second argument of function() must be "
|
||||
"a list or a dict"));
|
||||
xfree(name);
|
||||
return;
|
||||
|
@ -908,7 +908,7 @@ char *encode_tv2json(typval_T *tv, size_t *len)
|
||||
mpstack, objname)
|
||||
|
||||
#define TYPVAL_ENCODE_CONV_PARTIAL(partial) \
|
||||
return conv_error(_("E951: Error while dumping %s, %s: " \
|
||||
return conv_error(_("E5004: Error while dumping %s, %s: " \
|
||||
"attempt to dump partial"), \
|
||||
mpstack, objname)
|
||||
|
||||
|
27
test/functional/core/job_partial_spec.lua
Normal file
27
test/functional/core/job_partial_spec.lua
Normal file
@ -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)
|
@ -253,7 +253,7 @@ describe('dictionary change notifications', function()
|
||||
command('call g:ReplaceWatcher2()')
|
||||
command('let g:key = "value"')
|
||||
eq({'notification', '2b', {'key', {old = 'v2', new = 'value'}}}, next_msg())
|
||||
|
||||
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
@ -167,7 +167,7 @@ describe('terminal buffer', function()
|
||||
local tbuf = eval('bufnr("%")')
|
||||
|
||||
source([[
|
||||
function! SplitWindow()
|
||||
function! SplitWindow(id, data, event)
|
||||
new
|
||||
call feedkeys("iabc\<Esc>")
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user