comparison src/testdir/test_cd.vim @ 25868:bcf55847d2ed v8.2.3468

patch 8.2.3468: problem with :cd when editing file in non-existent directory Commit: https://github.com/vim/vim/commit/c6376c798433bcb9ee38a8664299d11454546950 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 3 19:29:48 2021 +0100 patch 8.2.3468: problem with :cd when editing file in non-existent directory Problem: Problem with :cd when editing file in non-existent directory. (Yee Cheng Chin) Solution: Prepend the current directory to get the full path. (closes #8903)
author Bram Moolenaar <Bram@vim.org>
date Sun, 03 Oct 2021 20:30:03 +0200
parents da0e5ff44b14
children 460790b520dd
comparison
equal deleted inserted replaced
25867:36011b4b6587 25868:bcf55847d2ed
206 call delete('XComplDir1', 'd') 206 call delete('XComplDir1', 'd')
207 call delete('XComplDir2', 'd') 207 call delete('XComplDir2', 'd')
208 call delete('XComplFile') 208 call delete('XComplFile')
209 endfunc 209 endfunc
210 210
211 func Test_cd_unknown_dir()
212 call mkdir('Xa')
213 cd Xa
214 call writefile(['text'], 'Xb.txt')
215 edit Xa/Xb.txt
216 let first_buf = bufnr()
217 cd ..
218 edit
219 call assert_equal(first_buf, bufnr())
220 edit Xa/Xb.txt
221 call assert_notequal(first_buf, bufnr())
222
223 bwipe!
224 exe "bwipe! " .. first_buf
225 call delete('Xa', 'rf')
226 endfunc
227
211 " vim: shiftwidth=2 sts=2 expandtab 228 " vim: shiftwidth=2 sts=2 expandtab