Patch 8.1.2067
Problem:    No tests for SafeState and SafeStateAgain.
Solution:   Add tests.
Files:      src/testdir/test_autocmd.vim


*** ../vim-8.1.2066/src/testdir/test_autocmd.vim        2019-09-01 
14:45:23.753964955 +0200
--- src/testdir/test_autocmd.vim        2019-09-22 21:44:17.727603154 +0200
***************
*** 2,7 ****
--- 2,8 ----
  
  source shared.vim
  source check.vim
+ source term_util.vim
  
  func s:cleanup_buffers() abort
    for bnr in range(1, bufnr('$'))
***************
*** 2225,2227 ****
--- 2226,2258 ----
    bwipe!
    au! throwing
  endfunc
+ 
+ func Test_autocmd_SafeState()
+   CheckRunVimInTerminal
+ 
+   let lines =<< trim END
+       let g:safe = 0
+       let g:again = ''
+       au SafeState * let g:safe += 1
+       au SafeStateAgain * let g:again ..= 'x'
+       func CallTimer()
+         call timer_start(10, {id -> execute('let g:again ..= "t"')})
+       endfunc
+   END
+   call writefile(lines, 'XSafeState')
+   let buf = RunVimInTerminal('-S XSafeState', #{rows: 6})
+ 
+   call term_sendkeys(buf, ":echo g:safe\<CR>")
+   call WaitForAssert({-> assert_match('^2 ', term_getline(buf, 6))}, 1000)
+ 
+   call term_sendkeys(buf, ":echo g:again\<CR>")
+   call WaitForAssert({-> assert_match('^xxxx', term_getline(buf, 6))}, 1000)
+ 
+   call term_sendkeys(buf, ":let g:again = ''\<CR>:call CallTimer()\<CR>")
+   call term_wait(buf)
+   call term_sendkeys(buf, ":echo g:again\<CR>")
+   call WaitForAssert({-> assert_match('xtx', term_getline(buf, 6))}, 1000)
+ 
+   call StopVimInTerminal(buf)
+   call delete('XSafeState')
+ endfunc
*** ../vim-8.1.2066/src/version.c       2019-09-22 21:29:49.659426007 +0200
--- src/version.c       2019-09-22 21:36:56.633504652 +0200
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     2067,
  /**/

-- 
Even got a Datapoint 3600(?) with a DD50 connector instead of the
usual DB25...  what a nightmare trying to figure out the pinout
for *that* with no spex...

 /// 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/201909221950.x8MJonuA014379%40masaka.moolenaar.net.

Raspunde prin e-mail lui