Patch 8.2.1497
Problem:    CursorHold test is flaky. (Jakub Kądziołka)
Solution:   Use WaitForAssert() (closes #6754)
Files:      src/testdir/test_autocmd.vim


*** ../vim-8.2.1496/src/testdir/test_autocmd.vim        2020-08-12 
18:50:31.871655841 +0200
--- src/testdir/test_autocmd.vim        2020-08-20 18:26:41.149243377 +0200
***************
*** 29,48 ****
    END
    call writefile(before, 'Xinit')
    let buf = RunVimInTerminal('-S Xinit Xfile', {})
!   call term_wait(buf)
    call term_sendkeys(buf, "gg")
    call term_wait(buf)
!   sleep 50m
    call term_sendkeys(buf, "j")
    call term_wait(buf)
!   sleep 50m
    call term_sendkeys(buf, "j")
    call term_wait(buf)
!   sleep 50m
    call StopVimInTerminal(buf)
  
-   call assert_equal(['1', '2', '3'], readfile('Xoutput')[-3:-1])
- 
    call delete('Xinit')
    call delete('Xoutput')
    call delete('Xfile')
--- 29,47 ----
    END
    call writefile(before, 'Xinit')
    let buf = RunVimInTerminal('-S Xinit Xfile', {})
!   call term_sendkeys(buf, "G")
!   call term_wait(buf, 20)
    call term_sendkeys(buf, "gg")
    call term_wait(buf)
!   call WaitForAssert({-> assert_equal(['1'], readfile('Xoutput')[-1:-1])})
    call term_sendkeys(buf, "j")
    call term_wait(buf)
!   call WaitForAssert({-> assert_equal(['1', '2'], 
readfile('Xoutput')[-2:-1])})
    call term_sendkeys(buf, "j")
    call term_wait(buf)
!   call WaitForAssert({-> assert_equal(['1', '2', '3'], 
readfile('Xoutput')[-3:-1])})
    call StopVimInTerminal(buf)
  
    call delete('Xinit')
    call delete('Xoutput')
    call delete('Xfile')
*** ../vim-8.2.1496/src/version.c       2020-08-20 18:02:42.715595020 +0200
--- src/version.c       2020-08-20 18:27:58.348643827 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1497,
  /**/

-- 
Vi is clearly superior to emacs, since "vi" has only two characters
(and two keystrokes), while "emacs" has five.  (Randy C. Ford)

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202008201629.07KGTuNl240351%40masaka.moolenaar.net.

Raspunde prin e-mail lui