Patch 8.2.2512
Problem:    Vim9: compiling error test sometimes fails.
Solution:   use WaitForAssert() instead of sleeping for a bit. (Dominique
            Pellé, closes #7837)
Files:      src/testdir/term_util.vim, src/testdir/test_vim9_func.vim,
            src/testdir/test_vim9_script.vim


*** ../vim-8.2.2511/src/testdir/term_util.vim   2020-11-01 20:58:22.835423347 
+0100
--- src/testdir/term_util.vim   2021-02-14 13:13:09.092981036 +0100
***************
*** 179,183 ****
--- 179,187 ----
    return buf
  endfunc
  
+ " Return concatenated lines in terminal.
+ func Term_getlines(buf, lines)
+   return join(map(a:lines, 'term_getline(a:buf, v:val)'), '')
+ endfunc
  
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.2511/src/testdir/test_vim9_func.vim      2021-02-12 
22:10:18.227311434 +0100
--- src/testdir/test_vim9_func.vim      2021-02-14 13:13:09.092981036 +0100
***************
*** 31,48 ****
    call writefile(lines, 'XTest_compile_error')
    var buf = RunVimInTerminal('-S XTest_compile_error',
                {rows: 10, wait_for_ruler: 0})
!   var text = ''
!   for loop in range(100)
!     text = ''
!     for i in range(1, 9)
!       text ..= term_getline(buf, i)
!     endfor
!     if text =~ 'Variable not found: nothing'
!       break
!     endif
!     sleep 20m
!   endfor
!   assert_match('Error detected while compiling command line.*Fails.*Variable 
not found: nothing', text)
  
    # clean up
    call StopVimInTerminal(buf)
--- 31,38 ----
    call writefile(lines, 'XTest_compile_error')
    var buf = RunVimInTerminal('-S XTest_compile_error',
                {rows: 10, wait_for_ruler: 0})
!   call WaitForAssert(() => assert_match('Error detected while compiling 
command line.*Fails.*Variable not found: nothing',
!                      Term_getlines(buf, range(1, 9))))
  
    # clean up
    call StopVimInTerminal(buf)
*** ../vim-8.2.2511/src/testdir/test_vim9_script.vim    2021-02-13 
15:02:43.063505534 +0100
--- src/testdir/test_vim9_script.vim    2021-02-14 13:13:09.092981036 +0100
***************
*** 755,761 ****
  enddef
  
  def Test_error_in_nested_function()
!   # an error in a nested :function aborts executin in the calling :def 
function
    var lines =<< trim END
        vim9script
        def Func()
--- 755,761 ----
  enddef
  
  def Test_error_in_nested_function()
!   # an error in a nested :function aborts executing in the calling :def 
function
    var lines =<< trim END
        vim9script
        def Func()
*** ../vim-8.2.2511/src/version.c       2021-02-14 12:57:32.556655461 +0100
--- src/version.c       2021-02-14 13:14:44.516606474 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2512,
  /**/

-- 
BLACK KNIGHT:  I move for no man.
ARTHUR:        So be it!
    [hah] [parry thrust]
    [ARTHUR chops the BLACK KNIGHT's left arm off]
ARTHUR:        Now stand aside, worthy adversary.
BLACK KNIGHT:  'Tis but a scratch.
                                  The Quest for the Holy Grail (Monty Python)

 /// 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/202102141218.11ECI5o81395806%40masaka.moolenaar.net.

Raspunde prin e-mail lui