patch 9.1.0392: tests: Vim9 debug tests may be flaky

Commit: 
https://github.com/vim/vim/commit/7edde3f39e755a573ae863de9b88f90d13c2f88b
Author: Christian Brabandt <c...@256bit.org>
Date:   Sat May 4 09:38:59 2024 +0200

    patch 9.1.0392: tests: Vim9 debug tests may be flaky
    
    Problem:  tests: Vim9 debug tests may be flaky
              (Shane-XB-Qian)
    Solution: Give a few more lines so that line-wrapping won't
              cause a hit-enter prompt
    
    The two tests Run_Test_debug_running_out_of_lines() and
    Run_Test_debug_with_lambda() test debugging of Vim script functions.
    
    Depending from what file-path the tests are run, it may cause
    line wrapping to occur on the following output:
    
    Entering Debug mode.  Type "cont" to continue.
    command line..script
    /home/chrisbra/code/vim-upstream/src/testdir/XdebugFunc[15]..function
    <SNR>9_Crash
    
    and if the window is too small, this will cause a hit-enter prompt and so
    the WaitForAssert() fails, causing failure of the following tests.
    
    So increase the (internal) Vim window by a few more lines, so that even
    if line-wrapping occurs, no hit-enter prompts happens and so the tests
    can finish.
    
    fixes: #14596
    closes: #14691
    
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index 9ec92b398..3ac106eaa 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -4551,11 +4551,11 @@ def Run_Test_debug_with_lambda()
       Func()
   END
   writefile(lines, 'XdebugFunc', 'D')
-  var buf = g:RunVimInTerminal('-S XdebugFunc', {rows: 6, wait_for_ruler: 0})
-  g:WaitForAssert(() => assert_match('^>', term_getline(buf, 6)))
+  var buf = g:RunVimInTerminal('-S XdebugFunc', {rows: 10, wait_for_ruler: 0})
+  g:WaitForAssert(() => assert_match('^>', term_getline(buf, 10)))
 
   term_sendkeys(buf, "cont\<CR>")
-  g:WaitForAssert(() => assert_match('\[0\]', term_getline(buf, 5)))
+  g:WaitForAssert(() => assert_match('\[0\]', term_getline(buf, 9)))
 
   g:StopVimInTerminal(buf)
 enddef
@@ -4586,12 +4586,12 @@ def Run_Test_debug_running_out_of_lines()
       Crash()
   END
   writefile(lines, 'XdebugFunc', 'D')
-  var buf = g:RunVimInTerminal('-S XdebugFunc', {rows: 6, wait_for_ruler: 0})
-  g:WaitForAssert(() => assert_match('^>', term_getline(buf, 6)))
+  var buf = g:RunVimInTerminal('-S XdebugFunc', {rows: 10, wait_for_ruler: 0})
+  g:WaitForAssert(() => assert_match('^>', term_getline(buf, 10)))
 
   term_sendkeys(buf, "next\<CR>")
   g:TermWait(buf)
-  g:WaitForAssert(() => assert_match('^>', term_getline(buf, 6)))
+  g:WaitForAssert(() => assert_match('^>', term_getline(buf, 10)))
 
   term_sendkeys(buf, "cont\<CR>")
   g:TermWait(buf)
diff --git a/src/version.c b/src/version.c
index a3bc3f982..1efc0814c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    392,
 /**/
     391,
 /**/

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1s3AJQ-00EctM-42%40256bit.org.

Raspunde prin e-mail lui