aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/cd_spec.lua
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2019-04-13 12:50:36 +0200
committerGitHub <noreply@github.com>2019-04-13 12:50:36 +0200
commit5f996e36d102beeb76848021fe0ded5107c8f24d (patch)
tree27da72da722367d870bb4aecdf4deeab60664c44 /test/functional/ex_cmds/cd_spec.lua
parentd08692a8246039b938b5645a6c01b4ff7f51671e (diff)
downloadrneovim-5f996e36d102beeb76848021fe0ded5107c8f24d.tar.gz
rneovim-5f996e36d102beeb76848021fe0ded5107c8f24d.tar.bz2
rneovim-5f996e36d102beeb76848021fe0ded5107c8f24d.zip
options: properly reset directories on 'autochdir' (#9894)
Fixes https://github.com/neovim/neovim/issues/9892
Diffstat (limited to 'test/functional/ex_cmds/cd_spec.lua')
-rw-r--r--test/functional/ex_cmds/cd_spec.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/cd_spec.lua b/test/functional/ex_cmds/cd_spec.lua
index bc2b365b30..283fcf9672 100644
--- a/test/functional/ex_cmds/cd_spec.lua
+++ b/test/functional/ex_cmds/cd_spec.lua
@@ -286,6 +286,15 @@ describe("getcwd()", function ()
command("call delete('../"..directories.global.."', 'd')")
eq("", helpers.eval("getcwd()"))
end)
+
+ it("works with 'autochdir' after local directory was set (#9892)", function()
+ local curdir = cwd()
+ command('lcd ' .. directories.global)
+ command('lcd -')
+ command('set autochdir')
+ command('edit ' .. directories.global .. '/foo')
+ eq(curdir .. pathsep .. directories.global, cwd())
+ end)
end)