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 =~ '[\\/]' .. fname .. '$'
+ if name =~ tail .. '$'
let nr += 1
endif
endfor
- call assert_equal(1, nr)
+ 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)
" 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