comparison src/testdir/test_cscope.vim @ 30164:f7a2de8a4ddc v9.0.0418

patch 9.0.0418: manually deleting temp test files Commit: https://github.com/vim/vim/commit/45bbaef0382c5468d9fac511775bd99ea7bf5b84 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 8 16:39:22 2022 +0100 patch 9.0.0418: manually deleting temp test files Problem: Manually deleting temp test files. Solution: Use the 'D' flag of writefile() and mkdir().
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Sep 2022 17:45:03 +0200
parents 0b47ef4e19b8
children 029c59bf78f1
comparison
equal deleted inserted replaced
30163:ac28d70ac476 30164:f7a2de8a4ddc
298 call CscopeSetupOrClean(0) 298 call CscopeSetupOrClean(0)
299 endfunc 299 endfunc
300 300
301 " Test ":cs add {dir}" (add the {dir}/cscope.out database) 301 " Test ":cs add {dir}" (add the {dir}/cscope.out database)
302 func Test_cscope_add_dir() 302 func Test_cscope_add_dir()
303 call mkdir('Xcscopedir', 'p') 303 call mkdir('Xcscopedir', 'pD')
304 304
305 " Cscope doesn't handle symlinks, so this needs to be resolved in case a 305 " Cscope doesn't handle symlinks, so this needs to be resolved in case a
306 " shadow directory is being used. 306 " shadow directory is being used.
307 let memfile = resolve('../memfile_test.c') 307 let memfile = resolve('../memfile_test.c')
308 call system('cscope -bk -fXcscopedir/cscope.out ' . memfile) 308 call system('cscope -bk -fXcscopedir/cscope.out ' . memfile)
316 call assert_match('^ 0 \d\+.*Xcscopedir/cscope.out\s\+<none>$', lines[2]) 316 call assert_match('^ 0 \d\+.*Xcscopedir/cscope.out\s\+<none>$', lines[2])
317 317
318 cs kill -1 318 cs kill -1
319 call delete('Xcscopedir/cscope.out') 319 call delete('Xcscopedir/cscope.out')
320 call assert_fails('cs add Xcscopedir', 'E563:') 320 call assert_fails('cs add Xcscopedir', 'E563:')
321
322 call delete('Xcscopedir', 'd')
323 endfunc 321 endfunc
324 322
325 func Test_cscopequickfix() 323 func Test_cscopequickfix()
326 set cscopequickfix=s-,g-,d+,c-,t+,e-,f0,i-,a- 324 set cscopequickfix=s-,g-,d+,c-,t+,e-,f0,i-,a-
327 call assert_equal('s-,g-,d+,c-,t+,e-,f0,i-,a-', &cscopequickfix) 325 call assert_equal('s-,g-,d+,c-,t+,e-,f0,i-,a-', &cscopequickfix)