Mercurial > vim
comparison src/testdir/test_cscope.vim @ 14607:73001276abce v8.1.0317
patch 8.1.0317: Cscope test fails when using shadow directory
commit https://github.com/vim/vim/commit/320bf2d85e9e2924d896b3072979598c954922e7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 22 20:06:26 2018 +0200
patch 8.1.0317: Cscope test fails when using shadow directory
Problem: Cscope test fails when using shadow directory.
Solution: Resolve symlink in Vim. (James McCoy, closes https://github.com/vim/vim/issues/3364)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 22 Aug 2018 20:15:08 +0200 |
parents | 72afa7268670 |
children | ce04ebdf26b8 |
comparison
equal
deleted
inserted
replaced
14606:bde787e80383 | 14607:73001276abce |
---|---|
257 endfunc | 257 endfunc |
258 | 258 |
259 " Test ":cs add {dir}" (add the {dir}/cscope.out database) | 259 " Test ":cs add {dir}" (add the {dir}/cscope.out database) |
260 func Test_cscope_add_dir() | 260 func Test_cscope_add_dir() |
261 call mkdir('Xcscopedir', 'p') | 261 call mkdir('Xcscopedir', 'p') |
262 call system('cscope -bk -fXcscopedir/cscope.out ../memfile_test.c') | 262 |
263 " Cscope doesn't handle symlinks, so this needs to be resolved in case a | |
264 " shadow directory is being used. | |
265 let memfile = resolve('../memfile_test.c') | |
266 call system('cscope -bk -fXcscopedir/cscope.out ' . memfile) | |
267 | |
263 cs add Xcscopedir | 268 cs add Xcscopedir |
264 let a = execute('cscope show') | 269 let a = execute('cscope show') |
265 let lines = split(a, "\n", 1) | 270 let lines = split(a, "\n", 1) |
266 call assert_equal(3, len(lines)) | 271 call assert_equal(3, len(lines)) |
267 call assert_equal(' # pid database name prepend path', lines[0]) | 272 call assert_equal(' # pid database name prepend path', lines[0]) |