Patch 9.0.0968
Problem:    GUI mouse event test is a bit flaky.
Solution:   Mark the test case as flaky.  Move test function failure checks to
            a separate test function.
Files:      src/testdir/test_gui.vim


*** ../vim-9.0.0967/src/testdir/test_gui.vim    2022-10-04 20:14:23.461997287 
+0100
--- src/testdir/test_gui.vim    2022-11-28 21:16:52.545164959 +0000
***************
*** 904,916 ****
  
  " Test GUI mouse events
  func Test_gui_mouse_event()
    set mousemodel=extend
    call test_override('no_query_mouse', 1)
    new
    call setline(1, ['one two three', 'four five six'])
- 
-   " place the cursor using left click in normal mode
    call cursor(1, 1)
    let args = #{button: 0, row: 2, col: 4, multiclick: 0, modifiers: 0}
    call test_gui_event('mouse', args)
    let args.button = 3
--- 904,920 ----
  
  " Test GUI mouse events
  func Test_gui_mouse_event()
+   " Low level input isn't 100% reliable
+   let g:test_is_flaky = 1
+ 
    set mousemodel=extend
    call test_override('no_query_mouse', 1)
    new
    call setline(1, ['one two three', 'four five six'])
    call cursor(1, 1)
+   redraw!
+ 
+   " place the cursor using left click and release in normal mode
    let args = #{button: 0, row: 2, col: 4, multiclick: 0, modifiers: 0}
    call test_gui_event('mouse', args)
    let args.button = 3
***************
*** 1175,1184 ****
    call feedkeys("\<Esc>", 'Lx!')
    call assert_equal([0, 2, 7, 0], getpos('.'))
    call assert_equal('wo thrfour five sixteen', getline(2))
    set mouse&
    let &guioptions = save_guioptions
  
-   " Test invalid parameters for test_gui_event()
    let args = #{row: 2, col: 4, multiclick: 0, modifiers: 0}
    call assert_false(test_gui_event('mouse', args))
    let args = #{button: 0, col: 4, multiclick: 0, modifiers: 0}
--- 1179,1199 ----
    call feedkeys("\<Esc>", 'Lx!')
    call assert_equal([0, 2, 7, 0], getpos('.'))
    call assert_equal('wo thrfour five sixteen', getline(2))
+ 
    set mouse&
    let &guioptions = save_guioptions
+   bw!
+   call test_override('no_query_mouse', 0)
+   set mousemodel&
+ endfunc
+ 
+ " Test invalid parameters for test_gui_event()
+ func Test_gui_event_mouse_fails()
+   call test_override('no_query_mouse', 1)
+   new
+   call setline(1, ['one two three', 'four five six'])
+   set mousemodel=extend
  
    let args = #{row: 2, col: 4, multiclick: 0, modifiers: 0}
    call assert_false(test_gui_event('mouse', args))
    let args = #{button: 0, col: 4, multiclick: 0, modifiers: 0}
*** ../vim-9.0.0967/src/version.c       2022-11-28 20:34:47.708140332 +0000
--- src/version.c       2022-11-28 21:17:15.897135220 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     968,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
173. You keep tracking down the email addresses of all your friends
     (even childhood friends).

 /// 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/20221128212112.6FAE81C1647%40moolenaar.net.

Raspunde prin e-mail lui