0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.1.0549: netbeans test depends on README.txt contents

Problem:    Netbeans test depends on README.txt contents.
Solution:   Use a generated file instead.
This commit is contained in:
Bram Moolenaar 2018-11-26 21:22:07 +01:00
parent 1341024e08
commit 10efcd5b02
3 changed files with 8 additions and 4 deletions

View File

@ -42,7 +42,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
myfile.write(received) myfile.write(received)
response = '' response = ''
if received.find('README.txt') > 0: if received.find('XREADME.txt') > 0:
name = received.split('"')[1] name = received.split('"')[1]
response = '5:putBufferNumber!33 "' + name + '"\n' response = '5:putBufferNumber!33 "' + name + '"\n'
response += '5:setDot!1 3/19\n' response += '5:setDot!1 3/19\n'

View File

@ -20,13 +20,14 @@ endfunc
func Nb_basic(port) func Nb_basic(port)
call delete("Xnetbeans") call delete("Xnetbeans")
call writefile([], "Xnetbeans") call writefile([], "Xnetbeans")
call writefile(repeat(['abcdefghijklmnopqrstuvwxyz'], 5), "XREADME.txt")
exe 'nbstart :localhost:' . a:port . ':bunny' exe 'nbstart :localhost:' . a:port . ':bunny'
call assert_true(has("netbeans_enabled")) call assert_true(has("netbeans_enabled"))
call WaitFor('len(readfile("Xnetbeans")) > 2') call WaitFor('len(readfile("Xnetbeans")) > 2')
split +$ README.txt split +$ XREADME.txt
" Opening README.txt will result in a setDot command " Opening XREADME.txt will result in a setDot command
call WaitFor('len(readfile("Xnetbeans")) > 4') call WaitFor('len(readfile("Xnetbeans")) > 4')
call WaitFor('getcurpos()[1] == 3') call WaitFor('getcurpos()[1] == 3')
let pos = getcurpos() let pos = getcurpos()
@ -41,11 +42,12 @@ func Nb_basic(port)
call assert_equal('AUTH bunny', lines[0]) call assert_equal('AUTH bunny', lines[0])
call assert_equal('0:version=0 "2.5"', lines[1]) call assert_equal('0:version=0 "2.5"', lines[1])
call assert_equal('0:startupDone=0', lines[2]) call assert_equal('0:startupDone=0', lines[2])
call assert_equal('0:fileOpened=0 "README.txt" T F', substitute(lines[3], '".*/', '"', '')) call assert_equal('0:fileOpened=0 "XREADME.txt" T F', substitute(lines[3], '".*/', '"', ''))
call assert_equal('0:disconnect=1', lines[6]) call assert_equal('0:disconnect=1', lines[6])
call delete("Xnetbeans") call delete("Xnetbeans")
call delete("XREADME.txt")
endfunc endfunc
func Test_nb_basic() func Test_nb_basic()

View File

@ -792,6 +792,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
549,
/**/ /**/
548, 548,
/**/ /**/