diff options
author | dundargoc <gocdundar@gmail.com> | 2024-04-08 11:03:20 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-04-08 22:51:00 +0200 |
commit | 7035125b2b26aa68fcfb7cda39377ac79926a0f9 (patch) | |
tree | d194a3556a367b42505f9e7d26637e7cb3674928 /test/functional/terminal/cursor_spec.lua | |
parent | 978962f9a00ce75216d2c36b79397ef3d2b54096 (diff) | |
download | rneovim-7035125b2b26aa68fcfb7cda39377ac79926a0f9.tar.gz rneovim-7035125b2b26aa68fcfb7cda39377ac79926a0f9.tar.bz2 rneovim-7035125b2b26aa68fcfb7cda39377ac79926a0f9.zip |
test: improve test conventions
Work on https://github.com/neovim/neovim/issues/27004.
Diffstat (limited to 'test/functional/terminal/cursor_spec.lua')
-rw-r--r-- | test/functional/terminal/cursor_spec.lua | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/functional/terminal/cursor_spec.lua b/test/functional/terminal/cursor_spec.lua index 9a56b4600b..f722965108 100644 --- a/test/functional/terminal/cursor_spec.lua +++ b/test/functional/terminal/cursor_spec.lua @@ -1,26 +1,26 @@ -local helpers = require('test.functional.helpers')(after_each) +local t = require('test.functional.testutil')(after_each) local Screen = require('test.functional.ui.screen') -local thelpers = require('test.functional.terminal.helpers') -local feed, clear = helpers.feed, helpers.clear -local testprg, command = helpers.testprg, helpers.command -local eq, eval = helpers.eq, helpers.eval -local matches = helpers.matches -local poke_eventloop = helpers.poke_eventloop -local hide_cursor = thelpers.hide_cursor -local show_cursor = thelpers.show_cursor -local is_os = helpers.is_os -local skip = helpers.skip +local tt = require('test.functional.terminal.testutil') +local feed, clear = t.feed, t.clear +local testprg, command = t.testprg, t.command +local eq, eval = t.eq, t.eval +local matches = t.matches +local poke_eventloop = t.poke_eventloop +local hide_cursor = tt.hide_cursor +local show_cursor = tt.show_cursor +local is_os = t.is_os +local skip = t.skip describe(':terminal cursor', function() local screen before_each(function() clear() - screen = thelpers.screen_setup() + screen = tt.screen_setup() end) it('moves the screen cursor when focused', function() - thelpers.feed_data('testing cursor') + tt.feed_data('testing cursor') screen:expect([[ tty ready | testing cursor{1: } | @@ -66,7 +66,7 @@ describe(':terminal cursor', function() :set number | ]]) feed('i') - helpers.poke_eventloop() + t.poke_eventloop() screen:expect([[ {7: 1 }tty ready | {7: 2 }rows: 6, cols: 46 | @@ -152,7 +152,7 @@ describe('buffer cursor position is correct in terminal without number column', local screen local function setup_ex_register(str) - screen = thelpers.setup_child_nvim({ + screen = tt.setup_child_nvim({ '-u', 'NONE', '-i', @@ -469,7 +469,7 @@ describe('buffer cursor position is correct in terminal with number column', fun local screen local function setup_ex_register(str) - screen = thelpers.setup_child_nvim({ + screen = tt.setup_child_nvim({ '-u', 'NONE', '-i', |