diff src/testdir/test_netbeans.vim @ 20625:116c7bd5e980 v8.2.0866

patch 8.2.0866: not enough tests for buffer writing Commit: https://github.com/vim/vim/commit/494e9069cb32620f7688a7cb128a3feff827639e Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 31 21:28:02 2020 +0200 patch 8.2.0866: not enough tests for buffer writing Problem: Not enough tests for buffer writing. Solution: Add more tests. Use CheckRunVimInTerminal in more places. (Yegappan Lakshmanan, closes #6167)
author Bram Moolenaar <Bram@vim.org>
date Sun, 31 May 2020 21:30:03 +0200
parents 235be779549f
children 9f9c26b3ddc5
line wrap: on
line diff
--- a/src/testdir/test_netbeans.vim
+++ b/src/testdir/test_netbeans.vim
@@ -607,10 +607,20 @@ func Nb_basic(port)
   call assert_equal('0:fileOpened=0 "" T F', l[-1])
   let g:last += 1
 
+  " Test for writing a netbeans buffer
+  call appendbufline(cmdbufnr, '$', 'nbbufwrite_Test')
+  call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 5)')
+  call assert_fails('write', 'E656:')
+  call setline(1, ['one', 'two'])
+  call assert_fails('1write!', 'E657:')
+  write
+  call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 10)')
+  let g:last += 10
+
   " detach
   call appendbufline(cmdbufnr, '$', 'detach_Test')
   call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 8)')
-  call WaitForAssert({-> assert_equal('0:disconnect=91', readfile("Xnetbeans")[-1])})
+  call WaitForAssert({-> assert_equal('0:disconnect=93', readfile("Xnetbeans")[-1])})
 
   " the connection was closed
   call assert_false(has("netbeans_enabled"))