diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-11-19 20:07:04 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2021-11-19 20:07:04 +0800 |
commit | 3d504f27a002b3ce6acf75398789a37611b35c44 (patch) | |
tree | 416fd401bf31eb50f601ff3ae2b5dfcc57d215a5 /test/functional | |
parent | 54e9cce61274c89e4d8cd80832faecf67724e834 (diff) | |
download | rneovim-3d504f27a002b3ce6acf75398789a37611b35c44.tar.gz rneovim-3d504f27a002b3ce6acf75398789a37611b35c44.tar.bz2 rneovim-3d504f27a002b3ce6acf75398789a37611b35c44.zip |
vim-patch:8.2.3618: getcwd() is unclear about how 'autochdir' is used
Problem: getcwd() is unclear about how 'autochdir' is used.
Solution: Update the help for getcwd(). Without any arguments always return
the actual current directory. (closes vim/vim#9142)
https://github.com/vim/vim/commit/851c7a699ae00bdc14a4db874cf722b7b7393b53
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ex_cmds/cd_spec.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/functional/ex_cmds/cd_spec.lua b/test/functional/ex_cmds/cd_spec.lua index 283fcf9672..f9cce0deb6 100644 --- a/test/functional/ex_cmds/cd_spec.lua +++ b/test/functional/ex_cmds/cd_spec.lua @@ -294,7 +294,16 @@ describe("getcwd()", function () command('set autochdir') command('edit ' .. directories.global .. '/foo') eq(curdir .. pathsep .. directories.global, cwd()) + eq(curdir, wcwd()) + call('mkdir', 'bar') + command('edit ' .. 'bar/foo') + eq(curdir .. pathsep .. directories.global .. pathsep .. 'bar', cwd()) + eq(curdir, wcwd()) + command('lcd ..') + eq(curdir .. pathsep .. directories.global, cwd()) + eq(curdir .. pathsep .. directories.global, wcwd()) + command('edit') + eq(curdir .. pathsep .. directories.global .. pathsep .. 'bar', cwd()) + eq(curdir .. pathsep .. directories.global, wcwd()) end) end) - - |