aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/cd_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/ex_cmds/cd_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/ex_cmds/cd_spec.lua')
-rw-r--r--test/functional/ex_cmds/cd_spec.lua26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/functional/ex_cmds/cd_spec.lua b/test/functional/ex_cmds/cd_spec.lua
index 1815c672dc..40c9172010 100644
--- a/test/functional/ex_cmds/cd_spec.lua
+++ b/test/functional/ex_cmds/cd_spec.lua
@@ -1,16 +1,16 @@
-- Specs for :cd, :tcd, :lcd and getcwd()
-local helpers = require('test.functional.helpers')(after_each)
-
-local eq = helpers.eq
-local call = helpers.call
-local clear = helpers.clear
-local command = helpers.command
-local exc_exec = helpers.exc_exec
-local pathsep = helpers.get_pathsep()
-local skip = helpers.skip
-local is_os = helpers.is_os
-local mkdir = helpers.mkdir
+local t = require('test.functional.testutil')(after_each)
+
+local eq = t.eq
+local call = t.call
+local clear = t.clear
+local command = t.command
+local exc_exec = t.exc_exec
+local pathsep = t.get_pathsep()
+local skip = t.skip
+local is_os = t.is_os
+local mkdir = t.mkdir
-- These directories will be created for testing
local directories = {
@@ -289,14 +289,14 @@ describe('getcwd()', function()
end)
after_each(function()
- helpers.rmdir(directories.global)
+ t.rmdir(directories.global)
end)
it('returns empty string if working directory does not exist', function()
skip(is_os('win'))
command('cd ' .. directories.global)
command("call delete('../" .. directories.global .. "', 'd')")
- eq('', helpers.eval('getcwd()'))
+ eq('', t.eval('getcwd()'))
end)
it("works with 'autochdir' after local directory was set (#9892)", function()