annotate src/testdir/test_netbeans.vim @ 22074:923f618adb59

Added tag v8.2.1586 for changeset 28b302ccfe217f22bed590436a401006a57faa6c
author Bram Moolenaar <Bram@vim.org>
date Fri, 04 Sep 2020 14:45:06 +0200
parents 9fba6d987d32
children c8a4ad051d23
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
34 " Read the "Xnetbeans" file and filter out geometry messages.
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
35 func ReadXnetbeans()
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
36 let l = readfile("Xnetbeans")
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
37 " Xnetbeans may include '0:geometry=' messages on GUI environment if window
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
38 " position, size, or z order are changed. Remove these messages because
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
39 " will causes troubles on check.
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
40 return filter(l, 'v:val !~ "^0:geometry="')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
41 endfunc
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
42
9517
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 func Nb_basic(port)
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 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
45 call writefile([], "Xnetbeans")
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
46
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
47 " 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
48 " communication with the netbeans server
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
49 let g:last = 0
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
50
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
51 " 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
52 exe 'nbstart :localhost:' .. a:port .. ':bunny'
9517
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 call assert_true(has("netbeans_enabled"))
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
54 call WaitFor('len(ReadXnetbeans()) > (g:last + 2)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
55 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
56 call assert_equal(['AUTH bunny',
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
57 \ '0:version=0 "2.5"',
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
58 \ '0:startupDone=0'], l[-3:])
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
59 let g:last += 3
9517
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
61 " 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
62 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
63
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
64 " 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
65 split Xcmdbuf
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
66 let cmdbufnr = bufnr()
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
67 call WaitFor('len(ReadXnetbeans()) > (g:last + 2)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
68 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
69 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
70 \ substitute(l[-3], '".*/', '"', ''))
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
71 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
72 \ substitute(l[-2], '".*/', '"', ''))
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
73 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
74 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
75
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
76 " 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
77 hide
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
78
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
79 sleep 1m
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
80
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
81 " getCursor test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
82 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
83 split Xfile1
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
84 call cursor(3, 4)
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
85 sleep 10m
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
86 call appendbufline(cmdbufnr, '$', 'getCursor_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
87 call WaitFor('len(ReadXnetbeans()) >= (g:last + 5)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
88 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
89 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
90 let g:last += 5
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
91
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
92 " Test for E627
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
93 call appendbufline(cmdbufnr, '$', 'E627_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
94 call WaitForError('E627:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
95 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
96 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
97 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
98 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
99
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
100 " Test for E628
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
101 call appendbufline(cmdbufnr, '$', 'E628_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
102 call WaitForError('E628:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
103 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
104 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
105 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
106 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
107
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
108 " Test for E632
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
109 call appendbufline(cmdbufnr, '$', 'E632_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
110 call WaitForError('E632:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
111 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
112 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
113 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
114 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
115
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
116 " Test for E633
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
117 call appendbufline(cmdbufnr, '$', 'E633_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
118 call WaitForError('E633:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
119 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
120 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
121 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
122 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
123
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
124 " Test for E634
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
125 call appendbufline(cmdbufnr, '$', 'E634_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
126 call WaitForError('E634:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
127 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
128 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
129 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
130 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
131
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
132 " Test for E635
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
133 call appendbufline(cmdbufnr, '$', 'E635_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
134 call WaitForError('E635:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
135 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
136 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
137 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
138 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
139
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
140 " Test for E636
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
141 call appendbufline(cmdbufnr, '$', 'E636_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
142 call WaitForError('E636:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
143 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
144 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
145 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
146 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
147
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
148 " Test for E637
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
149 call appendbufline(cmdbufnr, '$', 'E637_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
150 call WaitForError('E637:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
151 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
152 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
153 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
154 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
155
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
156 " Test for E638
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
157 call appendbufline(cmdbufnr, '$', 'E638_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
158 call WaitForError('E638:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
159 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
160 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
161 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
162 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
163
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
164 " Test for E639
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
165 call appendbufline(cmdbufnr, '$', 'E639_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
166 call WaitForError('E639:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
167 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
168 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
169 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
170 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
171
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
172 " Test for E640
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
173 call appendbufline(cmdbufnr, '$', 'E640_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
174 call WaitForError('E640:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
175 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
176 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
177 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
178 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
179
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
180 " Test for E641
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
181 call appendbufline(cmdbufnr, '$', 'E641_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
182 call WaitForError('E641:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
183 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
184 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
185 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
186 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
187
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
188 " Test for E642
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
189 call appendbufline(cmdbufnr, '$', 'E642_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
190 call WaitForError('E642:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
191 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
192 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
193 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
194 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
195
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
196 " Test for E643
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
197 call appendbufline(cmdbufnr, '$', 'E643_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
198 call WaitForError('E643:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
199 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
200 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
201 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
202 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
203
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
204 enew!
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
205
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
206 " Test for E644
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
207 call appendbufline(cmdbufnr, '$', 'E644_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
208 call WaitForError('E644:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
209 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
210 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
211 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
212 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
213
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
214 " 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
215 call appendbufline(cmdbufnr, '$', 'E645_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
216 set verbose=1
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
217 call WaitForError('E645:')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
218 set verbose&
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
219 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
220 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
221 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
222 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
223
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
224 " 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
225 call appendbufline(cmdbufnr, '$', 'E646_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
226 set verbose=1
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
227 call WaitForError('E646:')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
228 set verbose&
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
229 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
230 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
231 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
232 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
233
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
234 " Test for E647
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
235 call appendbufline(cmdbufnr, '$', 'E647_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
236 call WaitForError('E647:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
237 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
238 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
239 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
240 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
241
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
242 " Test for E648
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
243 call appendbufline(cmdbufnr, '$', 'E648_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
244 call WaitForError('E648:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
245 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
246 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
247 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
248 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
249
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
250 " Test for E650
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
251 call appendbufline(cmdbufnr, '$', 'E650_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
252 call WaitForError('E650:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
253 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
254 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
255 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
256 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
257
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
258 " Test for E651
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
259 call appendbufline(cmdbufnr, '$', 'E651_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
260 call WaitForError('E651:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
261 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
262 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
263 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
264 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
265
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
266 " Test for E652
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
267 call appendbufline(cmdbufnr, '$', 'E652_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
268 call WaitForError('E652:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
269 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
270 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
271 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
272 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
273
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
274 " editFile test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
275 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
276 call appendbufline(cmdbufnr, '$', 'editFile_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
277 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
278 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
279 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
280 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
281 call assert_equal('Xfile3', bufname())
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
282 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
283
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
284 " getLength test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
285 call appendbufline(cmdbufnr, '$', 'getLength_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
286 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
287 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
288 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
289 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
290
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
291 " getModified test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
292 call appendbufline(cmdbufnr, '$', 'getModified_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
293 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
294 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
295 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
296 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
297
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
298 " getText test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
299 call appendbufline(cmdbufnr, '$', 'getText_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
300 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
301 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
302 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
303 \ '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
304 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
305
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
306 " setDot test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
307 call appendbufline(cmdbufnr, '$', 'setDot_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
308 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
309 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
310 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
311 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
312
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
313 " startDocumentListen test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
314 call appendbufline(cmdbufnr, '$', 'startDocumentListen_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
315 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
316 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
317 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
318 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
319
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
320 " 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
321 " received the notifications
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
322 call append(2, 'blue sky')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
323 1d
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
324 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
325 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
326 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
327 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
328 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
329 let g:last += 3
9517
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
330
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
331 " stopDocumentListen test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
332 call appendbufline(cmdbufnr, '$', 'stopDocumentListen_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
333 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
334 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
335 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
336 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
337
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
338 " 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
339 sleep 1m
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
340
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
341 " 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
342 call append(2, 'clear sky')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
343 1d
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
344
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
345 " defineAnnoType test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
346 call appendbufline(cmdbufnr, '$', 'define_anno_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
347 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
348 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
349 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
350 sleep 1m
20390
8bbb8f0b6f9c patch 8.2.0750: netbeans test is a bit flaky
Bram Moolenaar <Bram@vim.org>
parents: 20087
diff changeset
351 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
352 \ sign_getdefined()[0])
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
353 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
354
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
355 " defineAnnoType with a long color name
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
356 call appendbufline(cmdbufnr, '$', 'E532_Test')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
357 call WaitForError('E532:')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
358 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
359 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
360 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
361 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
362
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
363 " addAnno test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
364 call appendbufline(cmdbufnr, '$', 'add_anno_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
365 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
366 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
367 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
368 sleep 1m
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
369 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
370 \ 'group': ''}], sign_getplaced()[0].signs)
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
371 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
372
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
373 " getAnno test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
374 call appendbufline(cmdbufnr, '$', 'get_anno_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
375 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
376 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
377 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
378 let g:last += 4
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 " removeAnno test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
381 call appendbufline(cmdbufnr, '$', 'remove_anno_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
382 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
383 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
384 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
385 sleep 1m
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
386 call assert_equal([], sign_getplaced())
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
387 let g:last += 3
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 " 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
390 call appendbufline(cmdbufnr, '$', 'getModifiedAll_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
391 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
392 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
393 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
394 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
395
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
396 let bufcount = len(getbufinfo())
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
397
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
398 " 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
399 call appendbufline(cmdbufnr, '$', 'create_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
400 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
401 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
402 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
403 " 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
404 sleep 10m
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
405 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
406 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
407
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
408 " setTitle test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
409 call appendbufline(cmdbufnr, '$', 'setTitle_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
410 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
411 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
412 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
413 let g:last += 3
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 " setFullName test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
416 call appendbufline(cmdbufnr, '$', 'setFullName_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
417 call WaitFor('len(ReadXnetbeans()) >= (g:last + 5)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
418 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
419 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
420 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
421 call assert_equal('Xfile4', bufname())
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
422 let g:last += 5
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
423
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
424 " initDone test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
425 call appendbufline(cmdbufnr, '$', 'initDone_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
426 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
427 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
428 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
429 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
430
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
431 " setVisible test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
432 hide enew
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
433 call appendbufline(cmdbufnr, '$', 'setVisible_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
434 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
435 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
436 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
437 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
438
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
439 " setModtime test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
440 call appendbufline(cmdbufnr, '$', 'setModtime_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
441 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
442 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
443 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
444 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
445
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
446 " insert test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
447 call appendbufline(cmdbufnr, '$', 'insert_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
448 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
449 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
450 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
451 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
452 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
453
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
454 " remove test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
455 call appendbufline(cmdbufnr, '$', 'remove_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
456 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
457 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
458 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
459 call assert_equal(['linine2'], getline(1, '$'))
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
460 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
461
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
462 " remove with invalid offset
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
463 call appendbufline(cmdbufnr, '$', 'remove_invalid_offset_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
464 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
465 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
466 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
467 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
468
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
469 " remove with invalid count
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
470 call appendbufline(cmdbufnr, '$', 'remove_invalid_count_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
471 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
472 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
473 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
474 let g:last += 4
9517
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
475
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
476 " guard test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
477 %d
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
478 call setline(1, ['foo bar', 'foo bar', 'foo bar'])
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
479 call WaitFor('len(ReadXnetbeans()) >= (g:last + 8)')
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
480 let g:last += 8
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
481
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
482 call appendbufline(cmdbufnr, '$', 'guard_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
483 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
484 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
485 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
486 sleep 1m
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
487 " 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
488 call assert_fails('normal 2GIbaz', 'E463:')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
489 call assert_fails('normal 2GAbaz', 'E463:')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
490 call assert_fails('normal dd', 'E463:')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
491 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
492 \ {'name': '10000', 'linehl': 'NBGuarded'}],
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
493 \ sign_getdefined())
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
494 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
495 \ '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
496 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
497
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
498 " setModified test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
499 call appendbufline(cmdbufnr, '$', 'setModified_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
500 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
501 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
502 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
503 call assert_equal(1, &modified)
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
504 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
505
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
506 " insertDone test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
507 let v:statusmsg = ''
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
508 call appendbufline(cmdbufnr, '$', 'insertDone_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
509 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
510 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
511 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
512 sleep 1m
21154
9f9c26b3ddc5 patch 8.2.1128: the write message mentions characters, but it's bytes
Bram Moolenaar <Bram@vim.org>
parents: 20625
diff changeset
513 call assert_match('.*/Xfile4" 3L, 0B', v:statusmsg)
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
514 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
515
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
516 " saveDone test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
517 let v:statusmsg = ''
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
518 call appendbufline(cmdbufnr, '$', 'saveDone_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
519 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
520 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
521 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
522 sleep 1m
21154
9f9c26b3ddc5 patch 8.2.1128: the write message mentions characters, but it's bytes
Bram Moolenaar <Bram@vim.org>
parents: 20625
diff changeset
523 call assert_match('.*/Xfile4" 3L, 0B', v:statusmsg)
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
524 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
525
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
526 " unimplemented command test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
527 call appendbufline(cmdbufnr, '$', 'invalidcmd_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
528 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
529 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
530 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
531 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
532
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
533 " unimplemented function test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
534 call appendbufline(cmdbufnr, '$', 'invalidfunc_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
535 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
536 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
537 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
538 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
539
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
540 " Test for removeAnno cmd failure
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
541 call appendbufline(cmdbufnr, '$', 'removeAnno_fail_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
542 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
543 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
544 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
545 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
546
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
547 " Test for guard cmd failure
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
548 call appendbufline(cmdbufnr, '$', 'guard_fail_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
549 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
550 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
551 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
552 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
553
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
554 " Test for save cmd failure
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
555 call appendbufline(cmdbufnr, '$', 'save_fail_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
556 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
557 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
558 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
559 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
560
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
561 " Test for netbeansBuffer cmd failure
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
562 call appendbufline(cmdbufnr, '$', 'netbeansBuffer_fail_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
563 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
564 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
565 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
566 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
567
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
568 " nbkey test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
569 call cursor(3, 3)
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
570 nbkey "\<C-F2>"
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
571 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
572 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
573 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
574 \ '3:keyCommand=85 ""\<C-F2>""',
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
575 \ '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
576 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
577
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
578 " setExitDelay test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
579 call appendbufline(cmdbufnr, '$', 'setExitDelay_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
580 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
581 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
582 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
583 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
584
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
585 " setReadonly test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
586 call appendbufline(cmdbufnr, '$', 'setReadOnly_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
587 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
588 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
589 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
590 let g:last += 3
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 " 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
593 call appendbufline(cmdbufnr, '$', 'close_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
594 call WaitFor('len(ReadXnetbeans()) >= (g:last + 4)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
595 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
596 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
597 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
598 call assert_equal(1, winnr('$'))
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
599 let g:last += 4
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
600
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
601 " specialKeys test
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
602 call appendbufline(cmdbufnr, '$', 'specialKeys_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
603 call WaitFor('len(ReadXnetbeans()) >= (g:last + 3)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
604 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
605 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
606 sleep 1m
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
607 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
608 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
609 let g:last += 3
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
610
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
611 " 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
612 enew | only!
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
613 nbkey "\<C-F3>"
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
614 call WaitFor('len(ReadXnetbeans()) >= (g:last + 1)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
615 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
616 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
617 let g:last += 1
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
618
20625
116c7bd5e980 patch 8.2.0866: not enough tests for buffer writing
Bram Moolenaar <Bram@vim.org>
parents: 20464
diff changeset
619 " Test for writing a netbeans buffer
116c7bd5e980 patch 8.2.0866: not enough tests for buffer writing
Bram Moolenaar <Bram@vim.org>
parents: 20464
diff changeset
620 call appendbufline(cmdbufnr, '$', 'nbbufwrite_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
621 call WaitFor('len(ReadXnetbeans()) >= (g:last + 5)')
20625
116c7bd5e980 patch 8.2.0866: not enough tests for buffer writing
Bram Moolenaar <Bram@vim.org>
parents: 20464
diff changeset
622 call assert_fails('write', 'E656:')
116c7bd5e980 patch 8.2.0866: not enough tests for buffer writing
Bram Moolenaar <Bram@vim.org>
parents: 20464
diff changeset
623 call setline(1, ['one', 'two'])
116c7bd5e980 patch 8.2.0866: not enough tests for buffer writing
Bram Moolenaar <Bram@vim.org>
parents: 20464
diff changeset
624 call assert_fails('1write!', 'E657:')
116c7bd5e980 patch 8.2.0866: not enough tests for buffer writing
Bram Moolenaar <Bram@vim.org>
parents: 20464
diff changeset
625 write
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
626 call WaitFor('len(ReadXnetbeans()) >= (g:last + 10)')
20625
116c7bd5e980 patch 8.2.0866: not enough tests for buffer writing
Bram Moolenaar <Bram@vim.org>
parents: 20464
diff changeset
627 let g:last += 10
116c7bd5e980 patch 8.2.0866: not enough tests for buffer writing
Bram Moolenaar <Bram@vim.org>
parents: 20464
diff changeset
628
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
629 " detach
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
630 call appendbufline(cmdbufnr, '$', 'detach_Test')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
631 call WaitFor('len(ReadXnetbeans()) >= (g:last + 8)')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
632 call WaitForAssert({-> assert_equal('0:disconnect=93', ReadXnetbeans()[-1])})
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
633
20390
8bbb8f0b6f9c patch 8.2.0750: netbeans test is a bit flaky
Bram Moolenaar <Bram@vim.org>
parents: 20087
diff changeset
634 " the connection was closed
10253
a92c4abb8c1f commit https://github.com/vim/vim/commit/8ddef48d1eade1911b946fdda8c73c80856e6273
Christian Brabandt <cb@256bit.org>
parents: 10162
diff changeset
635 call assert_false(has("netbeans_enabled"))
9517
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
636
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
637 call delete("Xnetbeans")
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
638 call delete('Xfile1')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
639 call delete('Xfile3')
9517
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
640 endfunc
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
641
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
642 func Test_nb_basic()
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
643 call ch_log('Test_nb_basic')
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
644 call s:run_server('Nb_basic')
9f8f03a44886 commit https://github.com/vim/vim/commit/321efdd77a7b9ac11ade90dd7634b5d37f4820fe
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
645 endfunc
9521
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
646
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
647 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
648 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
649 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
650
9521
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
651 call assert_fails('nbstart =notexist', 'E660:')
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
652 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
653 if has('unix')
20e7be5d99ac commit https://github.com/vim/vim/commit/53bdec2ac9b994eee9c60f2ab9ad8a8afb2b9594
Christian Brabandt <cb@256bit.org>
parents: 9521
diff changeset
654 call setfperm('Xnbauth', "rw-r--r--")
20e7be5d99ac commit https://github.com/vim/vim/commit/53bdec2ac9b994eee9c60f2ab9ad8a8afb2b9594
Christian Brabandt <cb@256bit.org>
parents: 9521
diff changeset
655 call assert_fails('nbstart =Xnbauth', 'E668:')
20e7be5d99ac commit https://github.com/vim/vim/commit/53bdec2ac9b994eee9c60f2ab9ad8a8afb2b9594
Christian Brabandt <cb@256bit.org>
parents: 9521
diff changeset
656 endif
9521
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
657 call setfperm('Xnbauth', "rw-------")
9996
c2968473c8dc commit https://github.com/vim/vim/commit/ffdf08c94e16b0813862bdfdbc1c92892d2e4c93
Christian Brabandt <cb@256bit.org>
parents: 9663
diff changeset
658 exe 'nbstart =Xnbauth'
9521
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
659 call assert_true(has("netbeans_enabled"))
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
660
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
661 call WaitFor('len(ReadXnetbeans()) > 2')
9521
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
662 nbclose
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
663 let lines = ReadXnetbeans()
9521
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
664 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
665 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
666 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
667
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
668 call delete("Xnbauth")
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
669 call delete("Xnetbeans")
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
670 endfunc
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
671
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
672 func Test_nb_file_auth()
820c8861d15c commit https://github.com/vim/vim/commit/603d657219154ef074eeb70f6892b0b54e4fc19b
Christian Brabandt <cb@256bit.org>
parents: 9517
diff changeset
673 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
674 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
675 endfunc
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
676
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
677 " 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
678 func Nb_quit_with_conn(port)
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
679 call delete("Xnetbeans")
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
680 call writefile([], "Xnetbeans")
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
681 let after =<< trim END
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
682 source shared.vim
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
683
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
684 func ReadXnetbeans()
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
685 let l = readfile("Xnetbeans")
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
686 return filter(l, 'v:val !~ "^0:geometry="')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
687 endfunc
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
688
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
689 " 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
690 exe 'nbstart :localhost:' .. g:port .. ':star'
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
691 call assert_true(has("netbeans_enabled"))
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
692 call WaitFor('len(ReadXnetbeans()) >= 3')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
693 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
694 call assert_equal(['AUTH star',
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
695 \ '0:version=0 "2.5"',
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
696 \ '0:startupDone=0'], l[-3:])
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 " 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
699 split Xcmdbuf
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
700 call WaitFor('len(ReadXnetbeans()) >= 6')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
701 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
702 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
703 \ substitute(l[-3], '".*/', '"', ''))
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
704 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
705 \ substitute(l[-2], '".*/', '"', ''))
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
706 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
707 sleep 1m
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
708
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
709 quit!
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
710 quit!
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
711 END
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
712 if RunVim(['let g:port = ' .. a:port], after, '')
21395
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
713 call WaitFor('len(ReadXnetbeans()) >= 9')
9fba6d987d32 patch 8.2.1248: Netbeans test is flaky in the GUI
Bram Moolenaar <Bram@vim.org>
parents: 21154
diff changeset
714 let l = ReadXnetbeans()
20087
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
715 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
716 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
717 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
718 endif
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
719 call delete('Xnetbeans')
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
720 endfunc
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
721
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
722 func Test_nb_quit_with_conn()
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
723 " 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
724 " MS-Windows.
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
725 CheckUnix
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
726 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
727 endfunc
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
728
b378f860d4ab patch 8.2.0599: Netbeans interface insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
729 " vim: shiftwidth=2 sts=2 expandtab