comparison src/testdir/test_autochdir.vim @ 26171:fa8161b003f6 v8.2.3617

patch 8.2.3617: ":verbose pwd" does not mention 'autochdir' was applied Commit: https://github.com/vim/vim/commit/0526815c15170a5926e1008600ec29d42d8b64c2 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 18 18:53:45 2021 +0000 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 https://github.com/vim/vim/issues/9142)
author Bram Moolenaar <Bram@vim.org>
date Thu, 18 Nov 2021 20:00:06 +0100
parents 08940efa6b4e
children 027c5b4b6f07
comparison
equal deleted inserted replaced
26170:3e5f506a2165 26171:fa8161b003f6
23 set noacd 23 set noacd
24 call chdir(cwd) 24 call chdir(cwd)
25 call delete('samples/Xtest') 25 call delete('samples/Xtest')
26 endfunc 26 endfunc
27 27
28 func Test_verbose_pwd()
29 let cwd = getcwd()
30 call test_autochdir()
31
32 edit global.txt
33 call assert_match('\[global\].*testdir$', execute('verbose pwd'))
34
35 call mkdir('Xautodir')
36 split Xautodir/local.txt
37 lcd Xautodir
38 call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd'))
39
40 set acd
41 wincmd w
42 call assert_match('\[autochdir\].*testdir$', execute('verbose pwd'))
43 wincmd w
44 call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd'))
45 set noacd
46 call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd'))
47 wincmd w
48 call assert_match('\[global\].*testdir', execute('verbose pwd'))
49 wincmd w
50 call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd'))
51
52 bwipe!
53 call chdir(cwd)
54 call delete('Xautodir', 'rf')
55 endfunc
56
28 " vim: shiftwidth=2 sts=2 expandtab 57 " vim: shiftwidth=2 sts=2 expandtab