Mercurial > vim
annotate src/testdir/test_netbeans.vim @ 20525:42e5347ff9b6
Added tag v8.2.0816 for changeset bed30e6b5a095706cba0ca717d52588156c2b391
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 24 May 2020 17:30:04 +0200 |
parents | 235be779549f |
children | 116c7bd5e980 |
rev | line source |
---|---|
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test the netbeans interface. |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
17089
8e9e9124c7a2
patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents:
17049
diff
changeset
|
3 source check.vim |
8e9e9124c7a2
patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents:
17049
diff
changeset
|
4 CheckFeature netbeans_intg |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 source shared.vim |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 let s:python = PythonProg() |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 if s:python == '' |
17089
8e9e9124c7a2
patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents:
17049
diff
changeset
|
10 throw 'Skipped: python program missing' |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 endif |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 |
19195
2ef19eed524a
patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents:
17089
diff
changeset
|
13 " Run "testfunc" after starting the server and stop the server afterwards. |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 func s:run_server(testfunc, ...) |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 call RunServer('test_netbeans.py', a:testfunc, a:000) |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 endfunc |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
18 " Wait for an exception (error) to be thrown. This is used to check whether a |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
19 " message from the netbeans server causes an error. It takes some time for Vim |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
20 " to process a netbeans message. So a sleep is used below to account for this. |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
21 func WaitForError(errcode) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
22 let save_exception = '' |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
23 for i in range(200) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
24 try |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
25 sleep 5m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
26 catch |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
27 let save_exception = v:exception |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
28 break |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
29 endtry |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
30 endfor |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
31 call assert_match(a:errcode, save_exception) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
32 endfunc |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
33 |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 func Nb_basic(port) |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 call delete("Xnetbeans") |
12742
af961e38e508
patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression
Christian Brabandt <cb@256bit.org>
parents:
12734
diff
changeset
|
36 call writefile([], "Xnetbeans") |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
37 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
38 " Last line number in the Xnetbeans file. Used to verify the result of the |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
39 " communication with the netbeans server |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
40 let g:last = 0 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
41 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
42 " Establish the connection with the netbeans server |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
43 exe 'nbstart :localhost:' .. a:port .. ':bunny' |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 call assert_true(has("netbeans_enabled")) |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
45 call WaitFor('len(readfile("Xnetbeans")) > (g:last + 2)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
46 let l = readfile("Xnetbeans") |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
47 call assert_equal(['AUTH bunny', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
48 \ '0:version=0 "2.5"', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
49 \ '0:startupDone=0'], l[-3:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
50 let g:last += 3 |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
52 " Trying to connect again to netbeans server should fail |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
53 call assert_fails("exe 'nbstart :localhost:' . a:port . ':bunny'", 'E511:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
54 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
55 " Open the command buffer to communicate with the server |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
56 split Xcmdbuf |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
57 let cmdbufnr = bufnr() |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
58 call WaitFor('len(readfile("Xnetbeans")) > (g:last + 2)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
59 let l = readfile("Xnetbeans") |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
60 call assert_equal('0:fileOpened=0 "Xcmdbuf" T F', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
61 \ substitute(l[-3], '".*/', '"', '')) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
62 call assert_equal('send: 1:putBufferNumber!15 "Xcmdbuf"', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
63 \ substitute(l[-2], '".*/', '"', '')) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
64 call assert_equal('1:startDocumentListen!16', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
65 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
66 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
67 " Keep the command buffer loaded for communication |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
68 hide |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
69 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
70 sleep 1m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
71 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
72 " getCursor test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
73 call writefile(['foo bar', 'foo bar', 'foo bar'], 'Xfile1') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
74 split Xfile1 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
75 call cursor(3, 4) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
76 sleep 10m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
77 call appendbufline(cmdbufnr, '$', 'getCursor_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
78 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 5)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
79 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
80 call assert_equal(['send: 0:getCursor/30', '30 -1 3 3 19'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
81 let g:last += 5 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
82 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
83 " Test for E627 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
84 call appendbufline(cmdbufnr, '$', 'E627_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
85 call WaitForError('E627:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
86 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
87 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
88 call assert_equal('send: 0 setReadOnly!31', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
89 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
90 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
91 " Test for E628 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
92 call appendbufline(cmdbufnr, '$', 'E628_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
93 call WaitForError('E628:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
94 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
95 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
96 call assert_equal('send: 0:setReadOnly 32', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
97 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
98 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
99 " Test for E632 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
100 call appendbufline(cmdbufnr, '$', 'E632_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
101 call WaitForError('E632:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
102 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
103 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
104 call assert_equal(['send: 0:getLength/33', '33 0'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
105 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
106 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
107 " Test for E633 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
108 call appendbufline(cmdbufnr, '$', 'E633_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
109 call WaitForError('E633:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
110 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
111 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
112 call assert_equal(['send: 0:getText/34', '34 '], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
113 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
114 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
115 " Test for E634 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
116 call appendbufline(cmdbufnr, '$', 'E634_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
117 call WaitForError('E634:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
118 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
119 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
120 call assert_equal(['send: 0:remove/35 1 1', '35'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
121 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
122 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
123 " Test for E635 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
124 call appendbufline(cmdbufnr, '$', 'E635_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
125 call WaitForError('E635:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
126 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
127 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
128 call assert_equal(['send: 0:insert/36 0 "line1\n"', '36'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
129 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
130 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
131 " Test for E636 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
132 call appendbufline(cmdbufnr, '$', 'E636_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
133 call WaitForError('E636:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
134 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
135 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
136 call assert_equal('send: 0:create!37', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
137 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
138 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
139 " Test for E637 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
140 call appendbufline(cmdbufnr, '$', 'E637_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
141 call WaitForError('E637:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
142 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
143 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
144 call assert_equal('send: 0:startDocumentListen!38', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
145 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
146 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
147 " Test for E638 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
148 call appendbufline(cmdbufnr, '$', 'E638_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
149 call WaitForError('E638:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
150 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
151 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
152 call assert_equal('send: 0:stopDocumentListen!39', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
153 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
154 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
155 " Test for E639 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
156 call appendbufline(cmdbufnr, '$', 'E639_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
157 call WaitForError('E639:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
158 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
159 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
160 call assert_equal('send: 0:setTitle!40 "Title"', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
161 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
162 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
163 " Test for E640 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
164 call appendbufline(cmdbufnr, '$', 'E640_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
165 call WaitForError('E640:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
166 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
167 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
168 call assert_equal('send: 0:initDone!41', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
169 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
170 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
171 " Test for E641 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
172 call appendbufline(cmdbufnr, '$', 'E641_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
173 call WaitForError('E641:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
174 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
175 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
176 call assert_equal('send: 0:putBufferNumber!42 "XSomeBuf"', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
177 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
178 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
179 " Test for E642 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
180 call appendbufline(cmdbufnr, '$', 'E642_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
181 call WaitForError('E642:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
182 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
183 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
184 call assert_equal('send: 9:putBufferNumber!43 "XInvalidBuf"', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
185 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
186 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
187 " Test for E643 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
188 call appendbufline(cmdbufnr, '$', 'E643_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
189 call WaitForError('E643:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
190 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
191 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
192 call assert_equal('send: 0:setFullName!44 "XSomeBuf"', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
193 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
194 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
195 enew! |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
196 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
197 " Test for E644 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
198 call appendbufline(cmdbufnr, '$', 'E644_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
199 call WaitForError('E644:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
200 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
201 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
202 call assert_equal('send: 0:editFile!45 "Xfile3"', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
203 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
204 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
205 " Test for E645 (shown only when verbose > 0) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
206 call appendbufline(cmdbufnr, '$', 'E645_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
207 set verbose=1 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
208 call WaitForError('E645:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
209 set verbose& |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
210 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
211 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
212 call assert_equal('send: 0:setVisible!46 T', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
213 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
214 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
215 " Test for E646 (shown only when verbose > 0) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
216 call appendbufline(cmdbufnr, '$', 'E646_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
217 set verbose=1 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
218 call WaitForError('E646:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
219 set verbose& |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
220 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
221 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
222 call assert_equal('send: 0:setModified!47 T', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
223 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
224 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
225 " Test for E647 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
226 call appendbufline(cmdbufnr, '$', 'E647_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
227 call WaitForError('E647:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
228 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
229 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
230 call assert_equal('send: 0:setDot!48 1/1', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
231 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
232 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
233 " Test for E648 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
234 call appendbufline(cmdbufnr, '$', 'E648_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
235 call WaitForError('E648:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
236 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
237 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
238 call assert_equal('send: 0:close!49', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
239 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
240 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
241 " Test for E650 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
242 call appendbufline(cmdbufnr, '$', 'E650_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
243 call WaitForError('E650:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
244 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
245 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
246 call assert_equal('send: 0:defineAnnoType!50 1 "abc" "a" "a" 1 1', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
247 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
248 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
249 " Test for E651 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
250 call appendbufline(cmdbufnr, '$', 'E651_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
251 call WaitForError('E651:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
252 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
253 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
254 call assert_equal('send: 0:addAnno!51 1 1 1 1', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
255 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
256 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
257 " Test for E652 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
258 call appendbufline(cmdbufnr, '$', 'E652_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
259 call WaitForError('E652:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
260 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
261 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
262 call assert_equal(['send: 0:getAnno/52 8', '52 0'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
263 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
264 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
265 " editFile test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
266 call writefile(['foo bar1', 'foo bar2', 'foo bar3'], 'Xfile3') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
267 call appendbufline(cmdbufnr, '$', 'editFile_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
268 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
269 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
270 call assert_equal('send: 2:editFile!53 "Xfile3"', l[-2]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
271 call assert_match('0:fileOpened=0 ".*/Xfile3" T F', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
272 call assert_equal('Xfile3', bufname()) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
273 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
274 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
275 " getLength test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
276 call appendbufline(cmdbufnr, '$', 'getLength_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
277 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
278 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
279 call assert_equal(['send: 2:getLength/54', '54 27'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
280 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
281 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
282 " getModified test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
283 call appendbufline(cmdbufnr, '$', 'getModified_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
284 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
285 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
286 call assert_equal(['send: 2:getModified/55', '55 0'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
287 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
288 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
289 " getText test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
290 call appendbufline(cmdbufnr, '$', 'getText_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
291 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
292 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
293 call assert_equal(['send: 2:getText/56', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
294 \ '56 "foo bar1\nfoo bar2\nfoo bar3\n"'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
295 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
296 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
297 " setDot test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
298 call appendbufline(cmdbufnr, '$', 'setDot_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
299 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
300 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
301 call assert_equal('send: 2:setDot!57 3/6', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
302 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
303 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
304 " startDocumentListen test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
305 call appendbufline(cmdbufnr, '$', 'startDocumentListen_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
306 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
307 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
308 call assert_equal('send: 2:startDocumentListen!58', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
309 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
310 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
311 " make some changes to the buffer and check whether the netbeans server |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
312 " received the notifications |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
313 call append(2, 'blue sky') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
314 1d |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
315 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
316 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
317 call assert_match('2:insert=\d\+ 18 "blue sky"', l[-3]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
318 call assert_match('2:insert=\d\+ 26 "\\n"', l[-2]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
319 call assert_match('2:remove=\d\+ 0 9', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
320 let g:last += 3 |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
321 |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
322 " stopDocumentListen test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
323 call appendbufline(cmdbufnr, '$', 'stopDocumentListen_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
324 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
325 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
326 call assert_equal('send: 2:stopDocumentListen!59', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
327 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
328 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
329 " Wait for vim to process the previous netbeans message |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
330 sleep 1m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
331 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
332 " modify the buffer and make sure that the netbeans server is not notified |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
333 call append(2, 'clear sky') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
334 1d |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
335 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
336 " defineAnnoType test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
337 call appendbufline(cmdbufnr, '$', 'define_anno_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
338 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
339 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
340 call assert_equal('send: 2:defineAnnoType!60 1 "s1" "x" "=>" blue none', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
341 sleep 1m |
20390
8bbb8f0b6f9c
patch 8.2.0750: netbeans test is a bit flaky
Bram Moolenaar <Bram@vim.org>
parents:
20087
diff
changeset
|
342 call assert_equal({'name': '1', 'texthl': 'NB_s1', 'text': '=>'}, |
8bbb8f0b6f9c
patch 8.2.0750: netbeans test is a bit flaky
Bram Moolenaar <Bram@vim.org>
parents:
20087
diff
changeset
|
343 \ sign_getdefined()[0]) |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
344 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
345 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
346 " defineAnnoType with a long color name |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
347 call appendbufline(cmdbufnr, '$', 'E532_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
348 call WaitForError('E532:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
349 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
350 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
351 call assert_equal('send: 2:defineAnnoType!61 1 "s1" "x" "=>" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa none', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
352 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
353 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
354 " addAnno test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
355 call appendbufline(cmdbufnr, '$', 'add_anno_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
356 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
357 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
358 call assert_equal('send: 2:addAnno!62 1 1 2/1 0', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
359 sleep 1m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
360 call assert_equal([{'lnum': 2, 'id': 1, 'name': '1', 'priority': 10, |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
361 \ 'group': ''}], sign_getplaced()[0].signs) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
362 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
363 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
364 " getAnno test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
365 call appendbufline(cmdbufnr, '$', 'get_anno_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
366 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
367 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
368 call assert_equal(['send: 2:getAnno/63 1', '63 2'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
369 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
370 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
371 " removeAnno test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
372 call appendbufline(cmdbufnr, '$', 'remove_anno_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
373 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
374 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
375 call assert_equal('send: 2:removeAnno!64 1', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
376 sleep 1m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
377 call assert_equal([], sign_getplaced()) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
378 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
379 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
380 " getModified test to get the number of modified buffers |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
381 call appendbufline(cmdbufnr, '$', 'getModifiedAll_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
382 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
383 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
384 call assert_equal(['send: 0:getModified/65', '65 2'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
385 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
386 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
387 let bufcount = len(getbufinfo()) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
388 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
389 " create test to create a new buffer |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
390 call appendbufline(cmdbufnr, '$', 'create_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
391 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
392 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
393 call assert_equal('send: 3:create!66', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
394 " Wait for vim to process the previous netbeans message |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
395 sleep 10m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
396 call assert_equal(bufcount + 1, len(getbufinfo())) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
397 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
398 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
399 " setTitle test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
400 call appendbufline(cmdbufnr, '$', 'setTitle_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
401 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
402 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
403 call assert_equal('send: 3:setTitle!67 "Xfile4"', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
404 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
405 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
406 " setFullName test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
407 call appendbufline(cmdbufnr, '$', 'setFullName_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
408 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 5)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
409 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
410 call assert_equal('send: 3:setFullName!68 "Xfile4"', l[-3]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
411 call assert_match('0:fileOpened=0 ".*/Xfile4" T F', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
412 call assert_equal('Xfile4', bufname()) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
413 let g:last += 5 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
414 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
415 " initDone test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
416 call appendbufline(cmdbufnr, '$', 'initDone_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
417 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
418 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
419 call assert_equal('send: 3:initDone!69', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
420 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
421 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
422 " setVisible test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
423 hide enew |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
424 call appendbufline(cmdbufnr, '$', 'setVisible_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
425 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
426 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
427 call assert_equal('send: 3:setVisible!70 T', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
428 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
429 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
430 " setModtime test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
431 call appendbufline(cmdbufnr, '$', 'setModtime_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
432 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
433 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
434 call assert_equal('send: 3:setModtime!71 6', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
435 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
436 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
437 " insert test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
438 call appendbufline(cmdbufnr, '$', 'insert_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
439 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
440 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
441 call assert_equal(['send: 3:insert/72 0 "line1\nline2\n"', '72'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
442 call assert_equal(['line1', 'line2'], getline(1, '$')) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
443 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
444 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
445 " remove test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
446 call appendbufline(cmdbufnr, '$', 'remove_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
447 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
448 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
449 call assert_equal(['send: 3:remove/73 3 4', '73'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
450 call assert_equal(['linine2'], getline(1, '$')) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
451 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
452 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
453 " remove with invalid offset |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
454 call appendbufline(cmdbufnr, '$', 'remove_invalid_offset_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
455 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
456 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
457 call assert_equal(['send: 3:remove/74 900 4', '74 !bad position'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
458 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
459 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
460 " remove with invalid count |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
461 call appendbufline(cmdbufnr, '$', 'remove_invalid_count_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
462 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
463 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
464 call assert_equal(['send: 3:remove/75 1 800', '75 !bad count'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
465 let g:last += 4 |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
466 |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
467 " guard test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
468 %d |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
469 call setline(1, ['foo bar', 'foo bar', 'foo bar']) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
470 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 8)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
471 let g:last += 8 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
472 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
473 call appendbufline(cmdbufnr, '$', 'guard_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
474 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
475 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
476 call assert_equal('send: 3:guard!76 8 7', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
477 sleep 1m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
478 " second line is guarded. Try modifying the line |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
479 call assert_fails('normal 2GIbaz', 'E463:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
480 call assert_fails('normal 2GAbaz', 'E463:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
481 call assert_fails('normal dd', 'E463:') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
482 call assert_equal([{'name': '1', 'texthl': 'NB_s1', 'text': '=>'}, |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
483 \ {'name': '10000', 'linehl': 'NBGuarded'}], |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
484 \ sign_getdefined()) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
485 call assert_equal([{'lnum': 2, 'id': 1000000, 'name': '10000', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
486 \ 'priority': 10, 'group': ''}], sign_getplaced()[0].signs) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
487 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
488 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
489 " setModified test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
490 call appendbufline(cmdbufnr, '$', 'setModified_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
491 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
492 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
493 call assert_equal('send: 3:setModified!77 T', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
494 call assert_equal(1, &modified) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
495 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
496 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
497 " insertDone test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
498 let v:statusmsg = '' |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
499 call appendbufline(cmdbufnr, '$', 'insertDone_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
500 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
501 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
502 call assert_equal('send: 3:insertDone!78 T F', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
503 sleep 1m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
504 call assert_match('.*/Xfile4" 3L, 0C', v:statusmsg) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
505 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
506 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
507 " saveDone test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
508 let v:statusmsg = '' |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
509 call appendbufline(cmdbufnr, '$', 'saveDone_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
510 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
511 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
512 call assert_equal('send: 3:saveDone!79', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
513 sleep 1m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
514 call assert_match('.*/Xfile4" 3L, 0C', v:statusmsg) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
515 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
516 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
517 " unimplemented command test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
518 call appendbufline(cmdbufnr, '$', 'invalidcmd_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
519 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
520 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
521 call assert_equal('send: 3:invalidcmd!80', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
522 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
523 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
524 " unimplemented function test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
525 call appendbufline(cmdbufnr, '$', 'invalidfunc_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
526 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
527 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
528 call assert_equal(['send: 3:invalidfunc/81', '81'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
529 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
530 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
531 " Test for removeAnno cmd failure |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
532 call appendbufline(cmdbufnr, '$', 'removeAnno_fail_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
533 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
534 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
535 call assert_equal(['send: 0:removeAnno/82 1', '82'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
536 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
537 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
538 " Test for guard cmd failure |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
539 call appendbufline(cmdbufnr, '$', 'guard_fail_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
540 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
541 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
542 call assert_equal(['send: 0:guard/83 1 1', '83'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
543 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
544 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
545 " Test for save cmd failure |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
546 call appendbufline(cmdbufnr, '$', 'save_fail_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
547 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
548 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
549 call assert_equal(['send: 0:save/84', '84'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
550 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
551 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
552 " Test for netbeansBuffer cmd failure |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
553 call appendbufline(cmdbufnr, '$', 'netbeansBuffer_fail_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
554 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
555 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
556 call assert_equal(['send: 0:netbeansBuffer/85 T', '85'], l[-2:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
557 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
558 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
559 " nbkey test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
560 call cursor(3, 3) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
561 nbkey "\<C-F2>" |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
562 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
563 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
564 call assert_equal(['3:newDotAndMark=85 18 18', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
565 \ '3:keyCommand=85 ""\<C-F2>""', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
566 \ '3:keyAtPos=85 ""\<C-F2>"" 18 3/2'], l[-3:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
567 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
568 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
569 " setExitDelay test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
570 call appendbufline(cmdbufnr, '$', 'setExitDelay_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
571 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
572 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
573 call assert_equal('send: 0:setExitDelay!86 2', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
574 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
575 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
576 " setReadonly test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
577 call appendbufline(cmdbufnr, '$', 'setReadOnly_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
578 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
579 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
580 call assert_equal('send: 3:setReadOnly!87', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
581 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
582 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
583 " close test. Don't use buffer 10 after this |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
584 call appendbufline(cmdbufnr, '$', 'close_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
585 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 4)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
586 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
587 call assert_equal('send: 3:close!88', l[-2]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
588 call assert_equal('3:killed=88', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
589 call assert_equal(1, winnr('$')) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
590 let g:last += 4 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
591 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
592 " specialKeys test |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
593 call appendbufline(cmdbufnr, '$', 'specialKeys_Test') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
594 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 3)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
595 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
596 call assert_equal('send: 0:specialKeys!89 "F12 F13"', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
597 sleep 1m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
598 call assert_equal(':nbkey F12<CR>', maparg('<F12>', 'n')) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
599 call assert_equal(':nbkey F13<CR>', maparg('<F13>', 'n')) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
600 let g:last += 3 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
601 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
602 " Open a buffer not monitored by netbeans |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
603 enew | only! |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
604 nbkey "\<C-F3>" |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
605 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 1)') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
606 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
607 call assert_equal('0:fileOpened=0 "" T F', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
608 let g:last += 1 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
609 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
610 " detach |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
611 call appendbufline(cmdbufnr, '$', 'detach_Test') |
20464
235be779549f
patch 8.2.0786: channel test is flaky on FreeBSD
Bram Moolenaar <Bram@vim.org>
parents:
20390
diff
changeset
|
612 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 8)') |
20390
8bbb8f0b6f9c
patch 8.2.0750: netbeans test is a bit flaky
Bram Moolenaar <Bram@vim.org>
parents:
20087
diff
changeset
|
613 call WaitForAssert({-> assert_equal('0:disconnect=91', readfile("Xnetbeans")[-1])}) |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
614 |
20390
8bbb8f0b6f9c
patch 8.2.0750: netbeans test is a bit flaky
Bram Moolenaar <Bram@vim.org>
parents:
20087
diff
changeset
|
615 " the connection was closed |
10253
a92c4abb8c1f
commit https://github.com/vim/vim/commit/8ddef48d1eade1911b946fdda8c73c80856e6273
Christian Brabandt <cb@256bit.org>
parents:
10162
diff
changeset
|
616 call assert_false(has("netbeans_enabled")) |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
617 |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
618 call delete("Xnetbeans") |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
619 call delete('Xfile1') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
620 call delete('Xfile3') |
9517
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
621 endfunc |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
622 |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
623 func Test_nb_basic() |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
624 call ch_log('Test_nb_basic') |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
625 call s:run_server('Nb_basic') |
9f8f03a44886
commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
626 endfunc |
9521
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
627 |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
628 func Nb_file_auth(port) |
12742
af961e38e508
patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression
Christian Brabandt <cb@256bit.org>
parents:
12734
diff
changeset
|
629 call delete("Xnetbeans") |
af961e38e508
patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression
Christian Brabandt <cb@256bit.org>
parents:
12734
diff
changeset
|
630 call writefile([], "Xnetbeans") |
af961e38e508
patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression
Christian Brabandt <cb@256bit.org>
parents:
12734
diff
changeset
|
631 |
9521
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
632 call assert_fails('nbstart =notexist', 'E660:') |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
633 call writefile(['host=localhost', 'port=' . a:port, 'auth=bunny'], 'Xnbauth') |
9603
20e7be5d99ac
commit https://github.com/vim/vim/commit/53bdec2ac9b994eee9c60f2ab9ad8a8afb2b9594
Christian Brabandt <cb@256bit.org>
parents:
9521
diff
changeset
|
634 if has('unix') |
20e7be5d99ac
commit https://github.com/vim/vim/commit/53bdec2ac9b994eee9c60f2ab9ad8a8afb2b9594
Christian Brabandt <cb@256bit.org>
parents:
9521
diff
changeset
|
635 call setfperm('Xnbauth', "rw-r--r--") |
20e7be5d99ac
commit https://github.com/vim/vim/commit/53bdec2ac9b994eee9c60f2ab9ad8a8afb2b9594
Christian Brabandt <cb@256bit.org>
parents:
9521
diff
changeset
|
636 call assert_fails('nbstart =Xnbauth', 'E668:') |
20e7be5d99ac
commit https://github.com/vim/vim/commit/53bdec2ac9b994eee9c60f2ab9ad8a8afb2b9594
Christian Brabandt <cb@256bit.org>
parents:
9521
diff
changeset
|
637 endif |
9521
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
638 call setfperm('Xnbauth', "rw-------") |
9996
c2968473c8dc
commit https://github.com/vim/vim/commit/ffdf08c94e16b0813862bdfdbc1c92892d2e4c93
Christian Brabandt <cb@256bit.org>
parents:
9663
diff
changeset
|
639 exe 'nbstart =Xnbauth' |
9521
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
640 call assert_true(has("netbeans_enabled")) |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
641 |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
642 call WaitFor('len(readfile("Xnetbeans")) > 2') |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
643 nbclose |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
644 let lines = readfile("Xnetbeans") |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
645 call assert_equal('AUTH bunny', lines[0]) |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
646 call assert_equal('0:version=0 "2.5"', lines[1]) |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
647 call assert_equal('0:startupDone=0', lines[2]) |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
648 |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
649 call delete("Xnbauth") |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
650 call delete("Xnetbeans") |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
651 endfunc |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
652 |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
653 func Test_nb_file_auth() |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
654 call ch_log('Test_nb_file_auth') |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
655 call s:run_server('Nb_file_auth') |
820c8861d15c
commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents:
9517
diff
changeset
|
656 endfunc |
20087
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
657 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
658 " Test for quiting Vim with an open netbeans connection |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
659 func Nb_quit_with_conn(port) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
660 call delete("Xnetbeans") |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
661 call writefile([], "Xnetbeans") |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
662 let after =<< trim END |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
663 source shared.vim |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
664 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
665 " Establish the connection with the netbeans server |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
666 exe 'nbstart :localhost:' .. g:port .. ':star' |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
667 call assert_true(has("netbeans_enabled")) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
668 call WaitFor('len(readfile("Xnetbeans")) >= 3') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
669 let l = readfile("Xnetbeans") |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
670 call assert_equal(['AUTH star', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
671 \ '0:version=0 "2.5"', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
672 \ '0:startupDone=0'], l[-3:]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
673 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
674 " Open the command buffer to communicate with the server |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
675 split Xcmdbuf |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
676 call WaitFor('len(readfile("Xnetbeans")) >= 6') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
677 let l = readfile("Xnetbeans") |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
678 call assert_equal('0:fileOpened=0 "Xcmdbuf" T F', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
679 \ substitute(l[-3], '".*/', '"', '')) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
680 call assert_equal('send: 1:putBufferNumber!15 "Xcmdbuf"', |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
681 \ substitute(l[-2], '".*/', '"', '')) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
682 call assert_equal('1:startDocumentListen!16', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
683 sleep 1m |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
684 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
685 quit! |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
686 quit! |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
687 END |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
688 if RunVim(['let g:port = ' .. a:port], after, '') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
689 call WaitFor('len(readfile("Xnetbeans")) >= 9') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
690 let l = readfile('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
691 call assert_equal('1:unmodified=16', l[-3]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
692 call assert_equal('1:killed=16', l[-2]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
693 call assert_equal('0:disconnect=16', l[-1]) |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
694 endif |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
695 call delete('Xnetbeans') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
696 endfunc |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
697 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
698 func Test_nb_quit_with_conn() |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
699 " Exiting Vim with a netbeans connection doesn't work properly on |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
700 " MS-Windows. |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
701 CheckUnix |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
702 call s:run_server('Nb_quit_with_conn') |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
703 endfunc |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
704 |
b378f860d4ab
patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
705 " vim: shiftwidth=2 sts=2 expandtab |