Patch 9.0.1028
Problem:    Mouse shape test is flaky, especially on Mac OS.
Solution:   Instead of starting all timers at the same time, start the next
            one in the callback of the previous one. (Yee Cheng Chin,
            closes #11673)  Also use "bwipe!" instead of "close!" to avoid
            swap files remaining.
Files:      src/testdir/test_normal.vim


*** ../vim-9.0.1027/src/testdir/test_normal.vim 2022-11-26 19:16:44.186717893 
+0000
--- src/testdir/test_normal.vim 2022-12-08 09:40:20.412337137 +0000
***************
*** 249,257 ****
    setlocal formatexpr=Format()
    normal VGgq
    call assert_equal(['one two'], getline(1, '$'))
    setlocal formatexpr=
    delfunc Format
!   close!
  endfunc
  
  " Test for using a script-local function for 'formatexpr'
--- 249,258 ----
    setlocal formatexpr=Format()
    normal VGgq
    call assert_equal(['one two'], getline(1, '$'))
+ 
    setlocal formatexpr=
    delfunc Format
!   bwipe!
  endfunc
  
  " Test for using a script-local function for 'formatexpr'
***************
*** 1279,1285 ****
    call assert_equal(15, line('w$'))
  
    set foldenable&
!   close!
  endfunc
  
  func Test_scroll_in_ex_mode()
--- 1280,1286 ----
    call assert_equal(15, line('w$'))
  
    set foldenable&
!   bwipe!
  endfunc
  
  func Test_scroll_in_ex_mode()
***************
*** 2290,2296 ****
    call assert_equal(2, line('.'))
    call assert_equal(-1, foldclosedend(line('.')))
  
!   close!
  endfunc
  
  " Test for changing case using u, U, gu, gU and ~ (tilde) commands
--- 2291,2297 ----
    call assert_equal(2, line('.'))
    call assert_equal(-1, foldclosedend(line('.')))
  
!   bwipe!
  endfunc
  
  " Test for changing case using u, U, gu, gU and ~ (tilde) commands
***************
*** 2387,2393 ****
      " can't use Turkish locale
      throw 'Skipped: Turkish locale not available'
    endtry
!   close!
  endfunc
  
  " Test for r (replace) command
--- 2388,2395 ----
      " can't use Turkish locale
      throw 'Skipped: Turkish locale not available'
    endtry
! 
!   bwipe!
  endfunc
  
  " Test for r (replace) command
***************
*** 2915,2921 ****
    call assert_equal([4, 5], [line('.'), col('.')])
    exe "normal! \<C-End>"
    call assert_equal([10, 6], [line('.'), col('.')])
!   close!
  endfunc
  
  " Test for cw cW ce
--- 2917,2924 ----
    call assert_equal([4, 5], [line('.'), col('.')])
    exe "normal! \<C-End>"
    call assert_equal([10, 6], [line('.'), col('.')])
! 
!   bwipe!
  endfunc
  
  " Test for cw cW ce
***************
*** 3395,3401 ****
    call assert_equal([7, 8, 15], [line('.'), col('.'), virtcol('.')])
    call assert_equal(-1, foldclosedend(7))
  
!   close!
  endfunc
  
  " Tests for g cmds
--- 3398,3404 ----
    call assert_equal([7, 8, 15], [line('.'), col('.'), virtcol('.')])
    call assert_equal(-1, foldclosedend(7))
  
!   bwipe!
  endfunc
  
  " Tests for g cmds
***************
*** 3510,3516 ****
    let @a = ''
    call feedkeys("\"ay:if v:true\<CR>normal l\<CR>endif\<CR>", 'xt')
    call assert_equal('f', @a)
!   close!
  endfunc
  
  " Test for supplying a count to a normal-mode command across a cursorhold call
--- 3513,3520 ----
    let @a = ''
    call feedkeys("\"ay:if v:true\<CR>normal l\<CR>endif\<CR>", 'xt')
    call assert_equal('f', @a)
! 
!   bwipe!
  endfunc
  
  " Test for supplying a count to a normal-mode command across a cursorhold call
***************
*** 3531,3537 ****
      au!
    augroup END
    au! normalcHoldTest
!   close!
    delfunc s:cHold
  endfunc
  
--- 3535,3542 ----
      au!
    augroup END
    au! normalcHoldTest
! 
!   bwipe!
    delfunc s:cHold
  endfunc
  
***************
*** 3555,3561 ****
    call assert_equal(11, col('.'))
    exe "normal! $\<C-BS>"
    call assert_equal(10, col('.'))
!   close!
  endfunc
  
  " Test for using a : command in operator pending mode
--- 3560,3567 ----
    call assert_equal(11, col('.'))
    exe "normal! $\<C-BS>"
    call assert_equal(10, col('.'))
! 
!   bwipe!
  endfunc
  
  " Test for using a : command in operator pending mode
***************
*** 3563,3569 ****
    new
    call setline(1, ['one', 'two'])
    call assert_beeps("normal! Gc:d\<CR>")
!   close!
  endfunc
  
  " Test for d and D commands
--- 3569,3575 ----
    new
    call setline(1, ['one', 'two'])
    call assert_beeps("normal! Gc:d\<CR>")
!   bwipe!
  endfunc
  
  " Test for d and D commands
***************
*** 3588,3594 ****
    call assert_fails('normal D', 'E21:')
    call assert_fails('normal d$', 'E21:')
  
!   close!
  endfunc
  
  " Test for deleting or changing characters across lines with 'whichwrap'
--- 3594,3600 ----
    call assert_fails('normal D', 'E21:')
    call assert_fails('normal d$', 'E21:')
  
!   bwipe!
  endfunc
  
  " Test for deleting or changing characters across lines with 'whichwrap'
***************
*** 3608,3614 ****
    call setline(1, ['one two', 'three four'])
    exe "norm! $3x"
    call assert_equal(['one twhree four'], getline(1, '$'))
!   close!
    set whichwrap&
  endfunc
  
--- 3614,3621 ----
    call setline(1, ['one two', 'three four'])
    exe "norm! $3x"
    call assert_equal(['one twhree four'], getline(1, '$'))
! 
!   bwipe!
    set whichwrap&
  endfunc
  
***************
*** 3646,3656 ****
    normal 3Gyb
    call assert_equal("two\n  ", @")
  
!   close!
  endfunc
  
  " Test for 'scrolloff' with a long line that doesn't fit in the screen
! func Test_normal_scroloff()
    10new
    60vnew
    call setline(1, ' 1 ' .. repeat('a', 57)
--- 3653,3663 ----
    normal 3Gyb
    call assert_equal("two\n  ", @")
  
!   bwipe!
  endfunc
  
  " Test for 'scrolloff' with a long line that doesn't fit in the screen
! func Test_normal_scrolloff()
    10new
    60vnew
    call setline(1, ' 1 ' .. repeat('a', 57)
***************
*** 3691,3698 ****
    call assert_equal(1, winline())
    normal $
    call assert_equal(10, winline())
    set scrolloff&
!   close!
  endfunc
  
  " Test for vertical scrolling with CTRL-F and CTRL-B with a long line
--- 3698,3706 ----
    call assert_equal(1, winline())
    normal $
    call assert_equal(10, winline())
+ 
    set scrolloff&
!   bwipe!
  endfunc
  
  " Test for vertical scrolling with CTRL-F and CTRL-B with a long line
***************
*** 3712,3718 ****
    exe "normal \<C-B>\<C-B>"
    call assert_equal(5, line('.'))
    call assert_equal(5, winline())
!   close!
  endfunc
  
  " Test for jumping in a file using %
--- 3720,3727 ----
    exe "normal \<C-B>\<C-B>"
    call assert_equal(5, line('.'))
    call assert_equal(5, winline())
! 
!   bwipe!
  endfunc
  
  " Test for jumping in a file using %
***************
*** 3725,3731 ****
    call feedkeys('50%', 'xt')
    call assert_equal(50, line('.'))
    call assert_equal(-1, foldclosedend(50))
!   close!
  endfunc
  
  " Test for << and >> commands to shift text by 'shiftwidth'
--- 3734,3741 ----
    call feedkeys('50%', 'xt')
    call assert_equal(50, line('.'))
    call assert_equal(-1, foldclosedend(50))
! 
!   bwipe!
  endfunc
  
  " Test for << and >> commands to shift text by 'shiftwidth'
***************
*** 3818,3841 ****
    CheckCanRunGui
  
    let lines =<< trim END
      set mouseshape+=o:busy
      setlocal nomodifiable
!     let g:mouse_shapes = []
! 
!     func SaveMouseShape(timer)
!       let g:mouse_shapes += [getmouseshape()]
!     endfunc
! 
!     func SaveAndQuit(timer)
!       call writefile(g:mouse_shapes, 'Xmouseshapes')
!       quit
!     endfunc
  
!     call timer_start(50, {_ -> feedkeys('c')})
!     call timer_start(100, 'SaveMouseShape')
!     call timer_start(150, {_ -> feedkeys('c')})
!     call timer_start(200, 'SaveMouseShape')
!     call timer_start(250, 'SaveAndQuit')
    END
    call writefile(lines, 'Xmouseshape.vim', 'D')
    call RunVim([], [], "-g -S Xmouseshape.vim")
--- 3828,3852 ----
    CheckCanRunGui
  
    let lines =<< trim END
+     vim9script
      set mouseshape+=o:busy
      setlocal nomodifiable
!     var mouse_shapes = []
  
!     feedkeys('c')
!     timer_start(50, (_) => {
!       mouse_shapes += [getmouseshape()]
!       timer_start(50, (_) => {
!         feedkeys('c')
!         timer_start(50, (_) => {
!           mouse_shapes += [getmouseshape()]
!           timer_start(50, (_) => {
!             writefile(mouse_shapes, 'Xmouseshapes')
!             quit
!           })
!         })
!       })
!     })
    END
    call writefile(lines, 'Xmouseshape.vim', 'D')
    call RunVim([], [], "-g -S Xmouseshape.vim")
*** ../vim-9.0.1027/src/version.c       2022-12-07 23:00:23.107179105 +0000
--- src/version.c       2022-12-08 09:24:15.851490783 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1028,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
257. Your "hundred-and-one" lists include well over 101 items, since you
     automatically interpret all numbers in hexadecimal notation.
     (hex 101 = decimal 257)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20221208094154.CCCA41C133A%40moolenaar.net.

Raspunde prin e-mail lui