aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/fold_spec.lua
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-04-08 11:03:20 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-04-08 22:51:00 +0200
commit7035125b2b26aa68fcfb7cda39377ac79926a0f9 (patch)
treed194a3556a367b42505f9e7d26637e7cb3674928 /test/functional/legacy/fold_spec.lua
parent978962f9a00ce75216d2c36b79397ef3d2b54096 (diff)
downloadrneovim-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/legacy/fold_spec.lua')
-rw-r--r--test/functional/legacy/fold_spec.lua15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/functional/legacy/fold_spec.lua b/test/functional/legacy/fold_spec.lua
index 0a65948fc7..2ec6f2ee8d 100644
--- a/test/functional/legacy/fold_spec.lua
+++ b/test/functional/legacy/fold_spec.lua
@@ -1,17 +1,16 @@
-- Tests for folding.
local Screen = require('test.functional.ui.screen')
-local helpers = require('test.functional.helpers')(after_each)
-local feed, insert, feed_command, expect_any =
- helpers.feed, helpers.insert, helpers.feed_command, helpers.expect_any
-local command = helpers.command
-local exec = helpers.exec
+local t = require('test.functional.testutil')(after_each)
+local feed, insert, feed_command, expect_any = t.feed, t.insert, t.feed_command, t.expect_any
+local command = t.command
+local exec = t.exec
describe('folding', function()
local screen
before_each(function()
- helpers.clear()
+ t.clear()
screen = Screen.new(45, 8)
screen:attach()
@@ -61,7 +60,7 @@ describe('folding', function()
feed('kYpj')
feed_command('call append("$", foldlevel("."))')
- helpers.poke_eventloop()
+ t.poke_eventloop()
screen:expect([[
dd {{{ |
ee {{{ }}} |
@@ -87,7 +86,7 @@ describe('folding', function()
feed_command('call append("$", foldlevel(2))')
feed('zR')
- helpers.poke_eventloop()
+ t.poke_eventloop()
screen:expect([[
aa |
bb |