mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 06:20:53 +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,6 +3,7 @@ local helpers = require('test.functional.helpers')(after_each)
|
||||
local eq = helpers.eq
|
||||
local neq = helpers.neq
|
||||
local command = helpers.command
|
||||
local exec_capture = helpers.exec_capture
|
||||
local write_file = helpers.write_file
|
||||
local meths = helpers.meths
|
||||
local clear = helpers.clear
|
||||
@@ -34,7 +35,7 @@ describe('script_get-based command', function()
|
||||
%s %s
|
||||
endif
|
||||
]])):format(cmd, garbage)))
|
||||
eq('', meths.exec2('messages', { output = true }).output)
|
||||
eq('', exec_capture('messages'))
|
||||
if check_neq then
|
||||
neq(0, exc_exec(dedent([[
|
||||
%s %s
|
||||
@@ -49,7 +50,7 @@ describe('script_get-based command', function()
|
||||
EOF
|
||||
endif
|
||||
]])):format(cmd, garbage)))
|
||||
eq('', meths.exec2('messages', { output = true }).output)
|
||||
eq('', exec_capture('messages'))
|
||||
if check_neq then
|
||||
eq(true, pcall(source, (dedent([[
|
||||
let g:exc = 0
|
||||
|
||||
Reference in New Issue
Block a user