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 | 4785cad8ee808d166a9cbc9d7ab5761da70d0563 (patch) | |
tree | f757646ccce3ddf29fe77288ddd095c876165f8c /src/nvim/testdir | |
parent | 0f58ba10e264697e4bb330a17b41cd9a0ceb8b1e (diff) | |
download | rneovim-4785cad8ee808d166a9cbc9d7ab5761da70d0563.tar.gz rneovim-4785cad8ee808d166a9cbc9d7ab5761da70d0563.tar.bz2 rneovim-4785cad8ee808d166a9cbc9d7ab5761da70d0563.zip |
vim-patch:8.2.3617: ":verbose pwd" does not mention 'autochdir' was applied
Problem: ":verbose pwd" does not mention 'autochdir' was applied.
Solution: Remember the last chdir was done by 'autochdir'. (issue vim/vim#9142)
https://github.com/vim/vim/commit/0526815c15170a5926e1008600ec29d42d8b64c2
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_autochdir.vim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autochdir.vim b/src/nvim/testdir/test_autochdir.vim index 0b76828dd7..e172d0cb9a 100644 --- a/src/nvim/testdir/test_autochdir.vim +++ b/src/nvim/testdir/test_autochdir.vim @@ -26,4 +26,34 @@ func Test_set_filename() call delete('samples/Xtest') endfunc +func Test_verbose_pwd() + CheckFunction test_autochdir + let cwd = getcwd() + call test_autochdir() + + edit global.txt + call assert_match('\[global\].*testdir$', execute('verbose pwd')) + + call mkdir('Xautodir') + split Xautodir/local.txt + lcd Xautodir + call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd')) + + set acd + wincmd w + call assert_match('\[autochdir\].*testdir$', execute('verbose pwd')) + wincmd w + call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) + set noacd + call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) + wincmd w + call assert_match('\[global\].*testdir', execute('verbose pwd')) + wincmd w + call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd')) + + bwipe! + call chdir(cwd) + call delete('Xautodir', 'rf') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |