Mercurial > vim
view src/testdir/test_netbeans.vim @ 9861:74f67cb4f7e1 v7.4.2205
commit https://github.com/vim/vim/commit/e9d58a6459687a1228b5aa85bd7b31f8f1e528a8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 13 15:07:41 2016 +0200
patch 7.4.2205
Problem: 'wildignore' always applies to getcompletion().
Solution: Add an option to use 'wildignore' or not. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 13 Aug 2016 15:15:04 +0200 |
parents | 27d3250c6dd4 |
children | c2968473c8dc |
line wrap: on
line source
" Test the netbeans interface. if !has('netbeans_intg') finish endif source shared.vim let s:python = PythonProg() if s:python == '' " Can't run this test. finish endif " Run "testfunc" after sarting the server and stop the server afterwards. func s:run_server(testfunc, ...) call RunServer('test_netbeans.py', a:testfunc, a:000) endfunc func Nb_basic(port) call delete("Xnetbeans") exe 'nbstart :localhost:' . a:port . ':bunny' call assert_true(has("netbeans_enabled")) call WaitFor('len(readfile("Xnetbeans")) > 2') split +$ Makefile " Opening Makefile will result in a setDot command call WaitFor('len(readfile("Xnetbeans")) > 4') call WaitFor('getcurpos()[1] == 2') let pos = getcurpos() call assert_equal(2, pos[1]) call assert_equal(20, pos[2]) close nbclose call WaitFor('len(readfile("Xnetbeans")) > 6') let lines = readfile("Xnetbeans") call assert_equal('AUTH bunny', lines[0]) call assert_equal('0:version=0 "2.5"', lines[1]) call assert_equal('0:startupDone=0', lines[2]) call assert_equal('0:fileOpened=0 "Makefile" T F', substitute(lines[3], '".*/', '"', '')) call assert_equal('0:disconnect=1', lines[6]) call delete("Xnetbeans") endfunc func Test_nb_basic() call ch_log('Test_nb_basic') call s:run_server('Nb_basic') endfunc func Nb_file_auth(port) call assert_fails('nbstart =notexist', 'E660:') call writefile(['host=localhost', 'port=' . a:port, 'auth=bunny'], 'Xnbauth') if has('unix') call setfperm('Xnbauth', "rw-r--r--") call assert_fails('nbstart =Xnbauth', 'E668:') endif call setfperm('Xnbauth', "rw-------") exe 'nbstart :localhost:' . a:port . ':bunny' call assert_true(has("netbeans_enabled")) call WaitFor('len(readfile("Xnetbeans")) > 2') nbclose let lines = readfile("Xnetbeans") call assert_equal('AUTH bunny', lines[0]) call assert_equal('0:version=0 "2.5"', lines[1]) call assert_equal('0:startupDone=0', lines[2]) call delete("Xnbauth") call delete("Xnetbeans") endfunc func Test_nb_file_auth() call ch_log('Test_nb_file_auth') call s:run_server('Nb_file_auth') endfunc