To: vim_dev@googlegroups.com Subject: Patch 8.1.0188 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0188 Problem: No test for ":cscope add". Solution: Add a test. (Dominique Pelle, closes #3212) Files: src/testdir/test_cscope.vim *** ../vim-8.1.0187/src/testdir/test_cscope.vim Thu Apr 5 19:04:00 2018 --- src/testdir/test_cscope.vim Sun Jul 15 17:34:34 2018 *************** *** 254,260 **** --- 254,278 ---- " CleanUp call CscopeSetupOrClean(0) + 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') + cs add Xcscopedir + let a = execute('cscope show') + let lines = split(a, "\n", 1) + call assert_equal(3, len(lines)) + call assert_equal(' # pid database name prepend path', lines[0]) + call assert_equal('', lines[1]) + call assert_match('^ 0 \d\+.*Xcscopedir/cscope.out\s\+$', lines[2]) + + cs kill -1 + call delete('Xcscopedir/cscope.out') + call assert_fails('cs add Xcscopedir', 'E563:') + call delete('Xcscopedir', 'd') endfunc func Test_cscopequickfix() *** ../vim-8.1.0187/src/version.c Sun Jul 15 17:01:06 2018 --- src/version.c Sun Jul 15 17:35:29 2018 *************** *** 791,792 **** --- 791,794 ---- { /* Add new patch number below this line */ + /**/ + 188, /**/ -- Emacs is a nice OS - but it lacks a good text editor. That's why I am using Vim. --Anonymous /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///