diff options
author | dundargoc <gocdundar@gmail.com> | 2024-04-20 17:44:13 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-04-23 18:17:04 +0200 |
commit | 052498ed42780a76daea589d063cd8947a894673 (patch) | |
tree | b6c85416a4d7ced5eabb0a7a3866f5e0fee886cc /test/functional/ui/cursor_spec.lua | |
parent | c5af5c0b9ab84c86f84e32210512923e7eb641ba (diff) | |
download | rneovim-052498ed42780a76daea589d063cd8947a894673.tar.gz rneovim-052498ed42780a76daea589d063cd8947a894673.tar.bz2 rneovim-052498ed42780a76daea589d063cd8947a894673.zip |
test: improve test conventions
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.
Closes https://github.com/neovim/neovim/issues/27004.
Diffstat (limited to 'test/functional/ui/cursor_spec.lua')
-rw-r--r-- | test/functional/ui/cursor_spec.lua | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test/functional/ui/cursor_spec.lua b/test/functional/ui/cursor_spec.lua index 9bfc8c6fb9..8bfceb8cce 100644 --- a/test/functional/ui/cursor_spec.lua +++ b/test/functional/ui/cursor_spec.lua @@ -1,8 +1,10 @@ -local t = require('test.functional.testutil')() +local t = require('test.testutil') +local n = require('test.functional.testnvim')() local Screen = require('test.functional.ui.screen') -local clear, api = t.clear, t.api + +local clear, api = n.clear, n.api local eq = t.eq -local command = t.command +local command = n.command describe('ui/cursor', function() local screen @@ -213,8 +215,8 @@ describe('ui/cursor', function() } -- Change the cursor style. - t.command('hi Cursor guibg=DarkGray') - t.command( + n.command('hi Cursor guibg=DarkGray') + n.command( 'set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr-o:hor20' .. ',a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor' .. ',sm:block-blinkwait175-blinkoff150-blinkon175' @@ -260,8 +262,8 @@ describe('ui/cursor', function() end) -- Change hl groups only, should update the styles - t.command('hi Cursor guibg=Red') - t.command('hi lCursor guibg=Green') + n.command('hi Cursor guibg=Red') + n.command('hi lCursor guibg=Green') -- Update the expected values. for _, m in ipairs(expected_mode_info) do @@ -280,7 +282,7 @@ describe('ui/cursor', function() end) -- update the highlight again to hide cursor - t.command('hi Cursor blend=100') + n.command('hi Cursor blend=100') for _, m in ipairs(expected_mode_info) do if m.hl_id then |