mirror of
https://github.com/neovim/neovim.git
synced 2025-12-04 21:52:41 +00:00
job control: reuse common job code for rpc jobs
This makes stderr and exit callbacks work for rpc jobs
This commit is contained in:
@@ -5,6 +5,7 @@ local clear, eq, eval, execute, feed, insert, neq, next_msg, nvim,
|
||||
helpers.insert, helpers.neq, helpers.next_message, helpers.nvim,
|
||||
helpers.nvim_dir, helpers.ok, helpers.source,
|
||||
helpers.write_file, helpers.mkdir, helpers.rmdir
|
||||
local command = helpers.command
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
|
||||
|
||||
@@ -429,6 +430,13 @@ describe('jobs', function()
|
||||
eq({'notification', 'j', {0, {jobid, 'exit'}}}, next_msg())
|
||||
end)
|
||||
|
||||
it('cannot have both rpc and pty options', function()
|
||||
command("let g:job_opts.pty = v:true")
|
||||
command("let g:job_opts.rpc = v:true")
|
||||
local _, err = pcall(command, "let j = jobstart(['cat', '-'], g:job_opts)")
|
||||
ok(string.find(err, "E475: Invalid argument: job cannot have both 'pty' and 'rpc' options set") ~= nil)
|
||||
end)
|
||||
|
||||
describe('running tty-test program', function()
|
||||
local function next_chunk()
|
||||
local rv
|
||||
|
||||
Reference in New Issue
Block a user