aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/mkview_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-03-09 14:57:57 -0700
committerJosh Rahm <joshuarahm@gmail.com>2024-03-09 14:57:57 -0700
commitc324271b99eee4c621463f368914d57cd729bd9c (patch)
tree5d979d333a2d5f9c080991d5482fd5916f8579c6 /test/functional/ex_cmds/mkview_spec.lua
parent931bffbda3668ddc609fc1da8f9eb576b170aa52 (diff)
parentade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff)
downloadrneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.gz
rneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.bz2
rneovim-c324271b99eee4c621463f368914d57cd729bd9c.zip
Merge remote-tracking branch 'upstream/master' into userreg
Diffstat (limited to 'test/functional/ex_cmds/mkview_spec.lua')
-rw-r--r--test/functional/ex_cmds/mkview_spec.lua12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/functional/ex_cmds/mkview_spec.lua b/test/functional/ex_cmds/mkview_spec.lua
index f71b826210..de0a4fe0ea 100644
--- a/test/functional/ex_cmds/mkview_spec.lua
+++ b/test/functional/ex_cmds/mkview_spec.lua
@@ -4,7 +4,7 @@ local clear = helpers.clear
local command = helpers.command
local get_pathsep = helpers.get_pathsep
local eq = helpers.eq
-local funcs = helpers.funcs
+local fn = helpers.fn
local rmdir = helpers.rmdir
local mkdir = helpers.mkdir
@@ -28,9 +28,8 @@ describe(':mkview', function()
end)
it('viewoption curdir restores local current directory', function()
- local cwd_dir = funcs.getcwd()
- local set_view_dir_command = 'set viewdir=' .. cwd_dir ..
- get_pathsep() .. view_dir
+ local cwd_dir = fn.getcwd()
+ local set_view_dir_command = 'set viewdir=' .. cwd_dir .. get_pathsep() .. view_dir
-- By default the local current directory should save
command(set_view_dir_command)
@@ -56,12 +55,11 @@ describe(':mkview', function()
command('edit ' .. tmp_file_base .. '2')
command('loadview')
-- The view's current directory should not have changed
- eq(cwd_dir, funcs.getcwd())
+ eq(cwd_dir, fn.getcwd())
-- Load the view with a saved local current directory
command('edit ' .. tmp_file_base .. '1')
command('loadview')
-- The view's local directory should have been saved
- eq(cwd_dir .. get_pathsep() .. local_dir, funcs.getcwd())
+ eq(cwd_dir .. get_pathsep() .. local_dir, fn.getcwd())
end)
-
end)