Mercurial > vim
changeset 35365:d46ff4861834 v9.1.0474
patch 9.1.0474: CI: Test_ColonEight() fails on github runners
Commit: https://github.com/vim/vim/commit/d03882baac712de586880775386f4c1e2cf6eade
Author: Christian Brabandt <cb@256bit.org>
Date: Mon Jun 10 21:06:55 2024 +0200
patch 9.1.0474: CI: Test_ColonEight() fails on github runners
Problem: CI: Test_ColonEight() fails on github runners
(Ken Takata)
Solution: Run the test for files on the C: drive, where dos shortnames
are still enabled, refactor the tests to use a single setup
function for the preparation
fixes: #14954
closes: #14958
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 10 Jun 2024 21:15:05 +0200 |
parents | 15d2d82ff285 |
children | 4c92818589e6 |
files | src/testdir/test_shortpathname.vim src/version.c |
diffstat | 2 files changed, 16 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_shortpathname.vim +++ b/src/testdir/test_shortpathname.vim @@ -16,18 +16,14 @@ func TestIt(file, bits, expected) endif endfunc -func Test_ColonEight() - let save_dir = getcwd() - - " This could change for CygWin to //cygdrive/c . - let dir1 = 'c:/x.x.y' +func s:SetupDir(dir) let trycount = 5 while 1 - if !filereadable(dir1) && !isdirectory(dir1) + if !filereadable(a:dir) && !isdirectory(a:dir) break endif if trycount == 1 - call assert_report("Fatal: '" . dir1 . "' exists, cannot run this test") + call assert_report("Fatal: '" . a:dir . "' exists, cannot run this test") return endif " When tests run in parallel the directory may exist, wait a bit until it @@ -35,6 +31,15 @@ func Test_ColonEight() sleep 5 let trycount -= 1 endwhile +endfunc + + +func Test_ColonEight() + let save_dir = getcwd() + + " This could change for CygWin to //cygdrive/c . + let dir1 = 'c:/x.x.y' + call s:SetupDir(dir1) let file1 = dir1 . '/zz.y.txt' let nofile1 = dir1 . '/z.y.txt' @@ -78,8 +83,8 @@ func Test_ColonEight() endfunc func Test_ColonEight_MultiByte() - let g:test_is_flaky = 1 - let dir = 'Xtest' + let dir = 'c:/Xtest_C8MB' + call s:SetupDir(dir) let file = dir . '/日本語のファイル.txt'