comparison src/testdir/test_cd.vim @ 20645:b60bb094af52 v8.2.0876

patch 8.2.0876: :pwd does not give a hint about the scope of the directory Commit: https://github.com/vim/vim/commit/950587242cad52d067a15f0f0c83528a28f75731 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 1 16:26:19 2020 +0200 patch 8.2.0876: :pwd does not give a hint about the scope of the directory Problem: :pwd does not give a hint about the scope of the directory Solution: Make ":verbose pwd" show the scope. (Takuya Fujiwara, closes https://github.com/vim/vim/issues/5469)
author Bram Moolenaar <Bram@vim.org>
date Mon, 01 Jun 2020 16:30:03 +0200
parents 94f05de75e9f
children d91b8d1e5198
comparison
equal deleted inserted replaced
20644:ca42fc075a80 20645:b60bb094af52
95 below new 95 below new
96 below new 96 below new
97 lcd z 97 lcd z
98 98
99 tabfirst 99 tabfirst
100 call assert_match('^\[global\] .*/Xdir$', trim(execute('verbose pwd')))
100 call chdir('..') 101 call chdir('..')
101 call assert_equal('y', fnamemodify(getcwd(1, 2), ':t')) 102 call assert_equal('y', fnamemodify(getcwd(1, 2), ':t'))
102 call assert_equal('z', fnamemodify(3->getcwd(2), ':t')) 103 call assert_equal('z', fnamemodify(3->getcwd(2), ':t'))
103 tabnext | wincmd t 104 tabnext | wincmd t
105 call assert_match('^\[tabpage\] .*/y$', trim(execute('verbose pwd')))
104 eval '..'->chdir() 106 eval '..'->chdir()
105 call assert_equal('Xdir', fnamemodify(getcwd(1, 2), ':t')) 107 call assert_equal('Xdir', fnamemodify(getcwd(1, 2), ':t'))
106 call assert_equal('Xdir', fnamemodify(getcwd(2, 2), ':t')) 108 call assert_equal('Xdir', fnamemodify(getcwd(2, 2), ':t'))
107 call assert_equal('z', fnamemodify(getcwd(3, 2), ':t')) 109 call assert_equal('z', fnamemodify(getcwd(3, 2), ':t'))
108 call assert_equal('testdir', fnamemodify(getcwd(1, 1), ':t')) 110 call assert_equal('testdir', fnamemodify(getcwd(1, 1), ':t'))
109 3wincmd w 111 3wincmd w
112 call assert_match('^\[window\] .*/z$', trim(execute('verbose pwd')))
110 call chdir('..') 113 call chdir('..')
111 call assert_equal('Xdir', fnamemodify(getcwd(1, 2), ':t')) 114 call assert_equal('Xdir', fnamemodify(getcwd(1, 2), ':t'))
112 call assert_equal('Xdir', fnamemodify(getcwd(2, 2), ':t')) 115 call assert_equal('Xdir', fnamemodify(getcwd(2, 2), ':t'))
113 call assert_equal('y', fnamemodify(getcwd(3, 2), ':t')) 116 call assert_equal('y', fnamemodify(getcwd(3, 2), ':t'))
114 call assert_equal('testdir', fnamemodify(getcwd(1, 1), ':t')) 117 call assert_equal('testdir', fnamemodify(getcwd(1, 1), ':t'))