mirror of
https://github.com/neovim/neovim.git
synced 2025-12-18 04:15:44 +00:00
vim-patch:9.0.1008: test for swapfilelist() fails on MS-Windows
Problem: Test for swapfilelist() fails on MS-Windows.
Solution: Only check the tail of the path. Mark a test as flaky.
6cf3151f0e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -116,16 +116,18 @@ func Test_swapinfo()
|
|||||||
let fname = s:swapname()
|
let fname = s:swapname()
|
||||||
call assert_match('Xswapinfo', fname)
|
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
|
let nr = 0
|
||||||
for name in swapfilelist()
|
for name in swapfilelist()
|
||||||
if name =~ '[\\/]' .. fname .. '$'
|
if name =~ tail .. '$'
|
||||||
let nr += 1
|
let nr += 1
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
call assert_equal(1, nr)
|
call assert_equal(1, nr, 'not found in ' .. string(swapfilelist()))
|
||||||
|
|
||||||
let info = fname->swapinfo()
|
let info = fname->swapinfo()
|
||||||
|
|
||||||
let ver = printf('VIM %d.%d', v:version / 100, v:version % 100)
|
let ver = printf('VIM %d.%d', v:version / 100, v:version % 100)
|
||||||
call assert_equal(ver, info.version)
|
call assert_equal(ver, info.version)
|
||||||
|
|
||||||
|
|||||||
@@ -5983,6 +5983,9 @@ endfunc
|
|||||||
|
|
||||||
" interrupt right before a catch is invoked in a script
|
" interrupt right before a catch is invoked in a script
|
||||||
func Test_ignore_catch_after_intr_1()
|
func Test_ignore_catch_after_intr_1()
|
||||||
|
" for unknown reasons this test sometimes fails on MS-Windows.
|
||||||
|
let g:test_is_flaky = 1
|
||||||
|
|
||||||
XpathINIT
|
XpathINIT
|
||||||
let lines =<< trim [CODE]
|
let lines =<< trim [CODE]
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user