]> granicus.if.org Git - vim/commitdiff
patch 8.1.0549: netbeans test depends on README.txt contents v8.1.0549
authorBram Moolenaar <Bram@vim.org>
Mon, 26 Nov 2018 20:22:07 +0000 (21:22 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 26 Nov 2018 20:22:07 +0000 (21:22 +0100)
Problem:    Netbeans test depends on README.txt contents.
Solution:   Use a generated file instead.

src/testdir/test_netbeans.py
src/testdir/test_netbeans.vim
src/version.c

index e0d291d60d4acfc1bdacba97aae68f0d648fbac6..bdebb54dde97c3ac0fea690307fc62ea68b4c399 100644 (file)
@@ -42,7 +42,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
                 myfile.write(received)
 
             response = ''
-            if received.find('README.txt') > 0:
+            if received.find('XREADME.txt') > 0:
                 name = received.split('"')[1]
                 response = '5:putBufferNumber!33 "' + name + '"\n'
                 response += '5:setDot!1 3/19\n'
index aa4e67661a70614c7ebf62ae041fda105ad106e0..66177ada76de205359db51872516a78fc5bcf9ff 100644 (file)
@@ -20,13 +20,14 @@ endfunc
 func Nb_basic(port)
   call delete("Xnetbeans")
   call writefile([], "Xnetbeans")
+  call writefile(repeat(['abcdefghijklmnopqrstuvwxyz'], 5), "XREADME.txt")
   exe 'nbstart :localhost:' . a:port . ':bunny'
   call assert_true(has("netbeans_enabled"))
 
   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('getcurpos()[1] == 3')
   let pos = getcurpos()
@@ -41,11 +42,12 @@ func Nb_basic(port)
   call assert_equal('AUTH bunny', lines[0])
   call assert_equal('0:version=0 "2.5"', lines[1])
   call assert_equal('0:startupDone=0', lines[2])
-  call assert_equal('0:fileOpened=0 "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 delete("Xnetbeans")
+  call delete("XREADME.txt")
 endfunc
 
 func Test_nb_basic()
index 3d4fa68df0cd6d46755476f6d3e589e08b0087fc..1fb70f882615e43d92189ec63ebed24bae857a3b 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    549,
 /**/
     548,
 /**/