Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
20624:f782c48d548a | 20625:116c7bd5e980 |
---|---|
605 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 1)') | 605 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 1)') |
606 let l = readfile('Xnetbeans') | 606 let l = readfile('Xnetbeans') |
607 call assert_equal('0:fileOpened=0 "" T F', l[-1]) | 607 call assert_equal('0:fileOpened=0 "" T F', l[-1]) |
608 let g:last += 1 | 608 let g:last += 1 |
609 | 609 |
610 " Test for writing a netbeans buffer | |
611 call appendbufline(cmdbufnr, '$', 'nbbufwrite_Test') | |
612 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 5)') | |
613 call assert_fails('write', 'E656:') | |
614 call setline(1, ['one', 'two']) | |
615 call assert_fails('1write!', 'E657:') | |
616 write | |
617 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 10)') | |
618 let g:last += 10 | |
619 | |
610 " detach | 620 " detach |
611 call appendbufline(cmdbufnr, '$', 'detach_Test') | 621 call appendbufline(cmdbufnr, '$', 'detach_Test') |
612 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 8)') | 622 call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 8)') |
613 call WaitForAssert({-> assert_equal('0:disconnect=91', readfile("Xnetbeans")[-1])}) | 623 call WaitForAssert({-> assert_equal('0:disconnect=93', readfile("Xnetbeans")[-1])}) |
614 | 624 |
615 " the connection was closed | 625 " the connection was closed |
616 call assert_false(has("netbeans_enabled")) | 626 call assert_false(has("netbeans_enabled")) |
617 | 627 |
618 call delete("Xnetbeans") | 628 call delete("Xnetbeans") |