From 6fae4608671900ca1d55cbed64015369c93b2a9e Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 25 May 2019 12:00:04 -0400 Subject: [PATCH] vim-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 vim/vim#3364) https://github.com/vim/vim/commit/320bf2d85e9e2924d896b3072979598c954922e7 --- src/nvim/testdir/test_cscope.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nvim/testdir/test_cscope.vim b/src/nvim/testdir/test_cscope.vim index 5aae3d52b5..af8776377e 100644 --- a/src/nvim/testdir/test_cscope.vim +++ b/src/nvim/testdir/test_cscope.vim @@ -259,7 +259,12 @@ endfunc " Test ":cs add {dir}" (add the {dir}/cscope.out database) func Test_cscope_add_dir() call mkdir('Xcscopedir', 'p') - call system('cscope -bk -fXcscopedir/cscope.out ../memfile_test.c') + + " Cscope doesn't handle symlinks, so this needs to be resolved in case a + " shadow directory is being used. + let memfile = resolve('../memfile_test.c') + call system('cscope -bk -fXcscopedir/cscope.out ' . memfile) + cs add Xcscopedir let a = execute('cscope show') let lines = split(a, "\n", 1)