mirror of
https://github.com/neovim/neovim.git
synced 2026-05-04 21:15:09 +00:00
test: use exec_capture() in more places (#22787)
Problem:
Using `meths.exec2("code", { output = true })` is too verbose.
Solution:
Use exec_capture() in more places.
This commit is contained in:
@@ -3,11 +3,11 @@ local helpers = require('test.functional.helpers')(after_each)
|
||||
local clear = helpers.clear
|
||||
local command = helpers.command
|
||||
local eq = helpers.eq
|
||||
local exec_capture = helpers.exec_capture
|
||||
local exec_lua = helpers.exec_lua
|
||||
local expect = helpers.expect
|
||||
local funcs = helpers.funcs
|
||||
local insert = helpers.insert
|
||||
local meths = helpers.meths
|
||||
local new_argv = helpers.new_argv
|
||||
local neq = helpers.neq
|
||||
local set_session = helpers.set_session
|
||||
@@ -101,7 +101,7 @@ describe('Remote', function()
|
||||
expect(contents)
|
||||
eq(1, #funcs.getbufinfo())
|
||||
-- Since we didn't pass silent, we should get a complaint
|
||||
neq(nil, string.find(meths.exec2('messages', { output = true }).output, 'E247'))
|
||||
neq(nil, string.find(exec_capture('messages'), 'E247:'))
|
||||
end)
|
||||
|
||||
it('creates server if not found with tabs', function()
|
||||
@@ -110,7 +110,7 @@ describe('Remote', function()
|
||||
eq(2, #funcs.gettabinfo())
|
||||
eq(2, #funcs.getbufinfo())
|
||||
-- We passed silent, so no message should be issued about the server not being found
|
||||
eq(nil, string.find(meths.exec2('messages', { output = true }).output, 'E247'))
|
||||
eq(nil, string.find(exec_capture('messages'), 'E247:'))
|
||||
end)
|
||||
|
||||
pending('exits with error on', function()
|
||||
|
||||
Reference in New Issue
Block a user