diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-26 10:49:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-26 10:49:32 +0800 |
commit | 4863ca6b8902c5b0aab95f2af640118cd417d379 (patch) | |
tree | 41a1ecb32984dc88f25df722abaf3ba381db3cf3 /test/functional/ui/messages_spec.lua | |
parent | 4eef5ac453866dae7c03f5432fc8c4dfcda19f54 (diff) | |
download | rneovim-4863ca6b8902c5b0aab95f2af640118cd417d379.tar.gz rneovim-4863ca6b8902c5b0aab95f2af640118cd417d379.tar.bz2 rneovim-4863ca6b8902c5b0aab95f2af640118cd417d379.zip |
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.
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 81602ef92e..5220f3fa89 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -10,6 +10,7 @@ local async_meths = helpers.async_meths local test_build_dir = helpers.test_build_dir local nvim_prog = helpers.nvim_prog local exec = helpers.exec +local exec_capture = helpers.exec_capture local exc_exec = helpers.exc_exec local exec_lua = helpers.exec_lua local poke_eventloop = helpers.poke_eventloop @@ -986,7 +987,7 @@ describe('ui/builtin messages', function() -- screen size doesn't affect internal output #10285 eq('ErrorMsg xxx ctermfg=15 ctermbg=1 guifg=White guibg=Red', - meths.exec2("hi ErrorMsg", { output = true }).output) + exec_capture("hi ErrorMsg")) end) it(':syntax list langGroup output', function() @@ -1025,7 +1026,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim match /\<endif\s\+".*$/ms=s+5,lc=5 contains=@vimCommentGroup,vimCommentString match /\<else\s\+".*$/ms=s+4,lc=4 contains=@vimCommentGroup,vimCommentString links to Comment]], - meths.exec2('syntax list vimComment', { output = true }).output) + exec_capture('syntax list vimComment')) -- luacheck: pop end) |