From 24bd7a4a9c2b13345c1f68f3604c1fd085eb9fa4 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Jul 2024 10:53:54 +0800 Subject: [PATCH] vim-patch:8.2.3579: CI sometimes fails for MinGW Problem: CI sometimes fails for MinGW. Solution: Use backslashes in HandleSwapExists(). (Christian Brabandt, closes vim/vim#9078) https://github.com/vim/vim/commit/4b2c8047679b737dcb0cd15c313ee51553aed617 Co-authored-by: Christian Brabandt --- test/old/testdir/runtest.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/old/testdir/runtest.vim b/test/old/testdir/runtest.vim index 53ad20dc6f..362964c5cb 100644 --- a/test/old/testdir/runtest.vim +++ b/test/old/testdir/runtest.vim @@ -95,7 +95,12 @@ set encoding=utf-8 " REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for " the test_name.vim file itself. Replace it here with a more restrictive one, " so we still catch mistakes. -let s:test_script_fname = expand('%') +if has("win32") + " replace any '/' directory separators by '\\' + let s:test_script_fname = substitute(expand('%'), '/', '\\', 'g') +else + let s:test_script_fname = expand('%') +endif au! SwapExists * call HandleSwapExists() func HandleSwapExists() if exists('g:ignoreSwapExists')