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/ui/linematch_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/ui/linematch_spec.lua')
-rw-r--r-- | test/functional/ui/linematch_spec.lua | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/functional/ui/linematch_spec.lua b/test/functional/ui/linematch_spec.lua index 2733902615..c917b2c8f0 100644 --- a/test/functional/ui/linematch_spec.lua +++ b/test/functional/ui/linematch_spec.lua @@ -1,9 +1,9 @@ -local helpers = require('test.functional.helpers')(after_each) +local t = require('test.functional.testutil')(after_each) local Screen = require('test.functional.ui.screen') -local feed = helpers.feed -local clear = helpers.clear -local write_file = helpers.write_file +local feed = t.feed +local clear = t.clear +local write_file = t.write_file describe('Diff mode screen with 3 diffs open', function() local fname = 'Xtest-functional-diff-screen-1' @@ -1094,10 +1094,10 @@ describe('regressions', function() screen = Screen.new(100, 20) screen:attach() -- line must be greater than MATCH_CHAR_MAX_LEN - helpers.api.nvim_buf_set_lines(0, 0, -1, false, { string.rep('a', 1000) .. 'hello' }) - helpers.exec 'vnew' - helpers.api.nvim_buf_set_lines(0, 0, -1, false, { string.rep('a', 1010) .. 'world' }) - helpers.exec 'windo diffthis' + t.api.nvim_buf_set_lines(0, 0, -1, false, { string.rep('a', 1000) .. 'hello' }) + t.exec 'vnew' + t.api.nvim_buf_set_lines(0, 0, -1, false, { string.rep('a', 1010) .. 'world' }) + t.exec 'windo diffthis' end) it('properly computes filler lines for hunks bigger than linematch limit', function() @@ -1109,10 +1109,10 @@ describe('regressions', function() for i = 0, 29 do lines[#lines + 1] = tostring(i) end - helpers.api.nvim_buf_set_lines(0, 0, -1, false, lines) - helpers.exec 'vnew' - helpers.api.nvim_buf_set_lines(0, 0, -1, false, { '00', '29' }) - helpers.exec 'windo diffthis' + t.api.nvim_buf_set_lines(0, 0, -1, false, lines) + t.exec 'vnew' + t.api.nvim_buf_set_lines(0, 0, -1, false, { '00', '29' }) + t.exec 'windo diffthis' feed('<C-e>') screen:expect { grid = [[ |