Patch 8.2.1937

6 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 1, 2020, 2:05:36 PM11/1/20
to vim...@googlegroups.com

Patch 8.2.1937
Problem: Vim9: test for confirm modifier fails in some situations.
Solution: Add a short wait. Handle failure better.
Files: src/testdir/term_util.vim, src/testdir/test_vim9_cmd.vim


*** ../vim-8.2.1936/src/testdir/term_util.vim 2020-09-23 17:41:09.845606730 +0200
--- src/testdir/term_util.vim 2020-11-01 19:57:57.336279277 +0100
***************
*** 147,154 ****
" Wait for all the pending updates to terminal to complete
call TermWait(a:buf)

call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
! only!
endfunc

" Open a terminal with a shell, assign the job to g:job and return the buffer
--- 147,159 ----
" Wait for all the pending updates to terminal to complete
call TermWait(a:buf)

+ " Wait for the terminal to end.
call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
!
! " If the buffer still exists forcefully wipe it.
! if bufexists(a:buf)
! exe a:buf .. 'bwipe!'
! endif
endfunc

" Open a terminal with a shell, assign the job to g:job and return the buffer
*** ../vim-8.2.1936/src/testdir/test_vim9_cmd.vim 2020-11-01 17:03:34.215513804 +0100
--- src/testdir/test_vim9_cmd.vim 2020-11-01 20:02:57.023328693 +0100
***************
*** 392,401 ****
--- 392,405 ----
call term_sendkeys(buf, ":call Getout()\n")
call WaitForAssert({-> assert_match('(Y)es, \[N\]o: ', term_getline(buf, 8))}, 1000)
call term_sendkeys(buf, "y")
+ call WaitForAssert({-> assert_match('(Y)es, \[N\]o: ', term_getline(buf, 8))}, 1000)
+ call term_sendkeys(buf, "\<CR>")
+ call TermWait(buf)
call StopVimInTerminal(buf)

call assert_equal(['changed'], readfile('Xfile'))
call delete('Xfile')
+ call delete('.Xfile.swp') " in case Vim was killed
call delete('Xconfirmscript')
endfunc

*** ../vim-8.2.1936/src/version.c 2020-11-01 17:40:47.829631403 +0100
--- src/version.c 2020-11-01 19:58:49.640112455 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1937,
/**/

--
If Microsoft would build a car...
... Occasionally, executing a maneuver such as a left turn
would cause your car to shut down and refuse to restart, in
which case you would have to reinstall the engine.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages