mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test/functional: cd_spec: Add tests for {getcwd,haslocaldir}(-1, -1)
This commit is contained in:
parent
a1303c2e11
commit
a3f11ad27a
@ -119,6 +119,25 @@ for _, cmd in ipairs {'cd', 'chdir'} do
|
|||||||
end)
|
end)
|
||||||
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()
|
it('works', function()
|
||||||
local globalDir = directories.start
|
local globalDir = directories.start
|
||||||
-- Create a new tab first and verify that is has the same working dir
|
-- Create a new tab first and verify that is has the same working dir
|
||||||
|
Loading…
Reference in New Issue
Block a user