aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/fileio_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/core/fileio_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/core/fileio_spec.lua')
-rw-r--r--test/functional/core/fileio_spec.lua64
1 files changed, 32 insertions, 32 deletions
diff --git a/test/functional/core/fileio_spec.lua b/test/functional/core/fileio_spec.lua
index 928cab525c..4b1018b0f0 100644
--- a/test/functional/core/fileio_spec.lua
+++ b/test/functional/core/fileio_spec.lua
@@ -1,37 +1,37 @@
local uv = vim.uv
-local helpers = require('test.functional.helpers')(after_each)
-
-local assert_log = helpers.assert_log
-local assert_nolog = helpers.assert_nolog
-local clear = helpers.clear
-local command = helpers.command
-local eq = helpers.eq
-local neq = helpers.neq
-local ok = helpers.ok
-local feed = helpers.feed
-local fn = helpers.fn
-local nvim_prog = helpers.nvim_prog
-local request = helpers.request
-local retry = helpers.retry
-local rmdir = helpers.rmdir
-local matches = helpers.matches
-local api = helpers.api
-local mkdir = helpers.mkdir
+local t = require('test.functional.testutil')(after_each)
+
+local assert_log = t.assert_log
+local assert_nolog = t.assert_nolog
+local clear = t.clear
+local command = t.command
+local eq = t.eq
+local neq = t.neq
+local ok = t.ok
+local feed = t.feed
+local fn = t.fn
+local nvim_prog = t.nvim_prog
+local request = t.request
+local retry = t.retry
+local rmdir = t.rmdir
+local matches = t.matches
+local api = t.api
+local mkdir = t.mkdir
local sleep = vim.uv.sleep
-local read_file = helpers.read_file
+local read_file = t.read_file
local trim = vim.trim
-local currentdir = helpers.fn.getcwd
-local assert_alive = helpers.assert_alive
-local check_close = helpers.check_close
-local expect_exit = helpers.expect_exit
-local write_file = helpers.write_file
+local currentdir = t.fn.getcwd
+local assert_alive = t.assert_alive
+local check_close = t.check_close
+local expect_exit = t.expect_exit
+local write_file = t.write_file
local Screen = require('test.functional.ui.screen')
-local feed_command = helpers.feed_command
-local skip = helpers.skip
-local is_os = helpers.is_os
-local is_ci = helpers.is_ci
-local spawn = helpers.spawn
-local set_session = helpers.set_session
+local feed_command = t.feed_command
+local skip = t.skip
+local is_os = t.is_os
+local is_ci = t.is_ci
+local spawn = t.spawn
+local set_session = t.set_session
describe('fileio', function()
before_each(function() end)
@@ -228,7 +228,7 @@ describe('fileio', function()
local initial_content = 'foo'
local backup_dir = 'Xtest_backupdir'
- local sep = helpers.get_pathsep()
+ local sep = t.get_pathsep()
local link_file_name = 'Xtest_startup_file2'
local backup_file_name = backup_dir .. sep .. link_file_name .. '~'
@@ -329,7 +329,7 @@ describe('tmpdir', function()
before_each(function()
-- Fake /tmp dir so that we can mess it up.
- os_tmpdir = vim.uv.fs_mkdtemp(vim.fs.dirname(helpers.tmpname()) .. '/nvim_XXXXXXXXXX')
+ os_tmpdir = vim.uv.fs_mkdtemp(vim.fs.dirname(t.tmpname()) .. '/nvim_XXXXXXXXXX')
end)
after_each(function()