aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/cd_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ex_cmds/cd_spec.lua')
-rw-r--r--test/functional/ex_cmds/cd_spec.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/cd_spec.lua b/test/functional/ex_cmds/cd_spec.lua
index d17aeed72f..00b3b083d1 100644
--- a/test/functional/ex_cmds/cd_spec.lua
+++ b/test/functional/ex_cmds/cd_spec.lua
@@ -119,6 +119,25 @@ for _, cmd in ipairs {'cd', 'chdir'} do
end)
end)
+ describe('getcwd(-1, -1)', function()
+ it('works', function()
+ eq(directories.start, cwd(-1, -1))
+ eq(0, lwd(-1, -1))
+ end)
+
+ it('works with tab-local pwd', function()
+ execute('silent t' .. cmd .. ' ' .. directories.tab)
+ eq(directories.start, cwd(-1, -1))
+ eq(0, lwd(-1, -1))
+ end)
+
+ it('works with window-local pwd', function()
+ execute('silent l' .. cmd .. ' ' .. directories.window)
+ eq(directories.start, cwd(-1, -1))
+ eq(0, lwd(-1, -1))
+ end)
+ end)
+
it('works', function()
local globalDir = directories.start
-- Create a new tab first and verify that is has the same working dir