diff options
author | James McCoy <jamessan@jamessan.com> | 2016-06-01 00:40:03 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-06-01 06:48:41 -0400 |
commit | a3f11ad27af930b52f429f6f04f7c5c232553720 (patch) | |
tree | 812964cffa8c05d357b8a4d247aa69844608cc91 /test/functional/ex_cmds/cd_spec.lua | |
parent | a1303c2e1167dc0b64f8139c50a01569f0bc1f17 (diff) | |
download | rneovim-a3f11ad27af930b52f429f6f04f7c5c232553720.tar.gz rneovim-a3f11ad27af930b52f429f6f04f7c5c232553720.tar.bz2 rneovim-a3f11ad27af930b52f429f6f04f7c5c232553720.zip |
test/functional: cd_spec: Add tests for {getcwd,haslocaldir}(-1, -1)
Diffstat (limited to 'test/functional/ex_cmds/cd_spec.lua')
-rw-r--r-- | test/functional/ex_cmds/cd_spec.lua | 19 |
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 |