Patch 9.0.1008 (after 9.0.1007)
Problem:    Test for swapfilelist() fails on MS-Windows.
Solution:   Only check the tail of the path.  Mark a test as flaky.
Files:      src/testdir/test_swap.vim, src/testdir/test_vimscript.vim


*** ../vim-9.0.1007/src/testdir/test_swap.vim   2022-12-05 13:50:49.718052362 
+0000
--- src/testdir/test_swap.vim   2022-12-05 14:49:57.519005931 +0000
***************
*** 111,126 ****
    let fname = s:swapname()
    call assert_match('Xswapinfo', fname)
  
    let nr = 0
    for name in swapfilelist()
!     if name =~ '[\\/]' .. fname .. '$'
        let nr += 1
      endif
    endfor
!   call assert_equal(1, nr)
  
    let info = fname->swapinfo()
- 
    let ver = printf('VIM %d.%d', v:version / 100, v:version % 100)
    call assert_equal(ver, info.version)
  
--- 111,128 ----
    let fname = s:swapname()
    call assert_match('Xswapinfo', fname)
  
+   " Check the tail appears in the list from swapfilelist().  The path depends
+   " on the system.
+   let tail = fnamemodify(fname, ":t")->fnameescape()
    let nr = 0
    for name in swapfilelist()
!     if name =~ tail .. '$'
        let nr += 1
      endif
    endfor
!   call assert_equal(1, nr, 'not found in ' .. string(swapfilelist()))
  
    let info = fname->swapinfo()
    let ver = printf('VIM %d.%d', v:version / 100, v:version % 100)
    call assert_equal(ver, info.version)
  
*** ../vim-9.0.1007/src/testdir/test_vimscript.vim      2022-11-12 
23:12:51.076972077 +0000
--- src/testdir/test_vimscript.vim      2022-12-05 15:00:11.093910619 +0000
***************
*** 5977,5982 ****
--- 5977,5985 ----
  
  " interrupt right before a catch is invoked in a script
  func Test_ignore_catch_after_intr_1()
+   " for unknown reasons this test sometimes fails on MS-Windows.
+   let g:test_is_flaky = 1
+ 
    XpathINIT
    let lines =<< trim [CODE]
      try
*** ../vim-9.0.1007/src/version.c       2022-12-05 13:50:49.722052362 +0000
--- src/version.c       2022-12-05 14:45:33.555795888 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1008,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
234. You started college as a chemistry major, and walk out four years
     later as an Internet provider.

 /// 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/20221205150134.683DD1C1D84%40moolenaar.net.

Raspunde prin e-mail lui