summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_shortpathname.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-20 03:56:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-20 03:56:56 +0000
commit75a9fa68f6cdd6769813a8c5e055bfb00a08c089 (patch)
treedaf1676b4e5ea491b7a370467a24b8181cc21827 /src/testdir/test_shortpathname.vim
parentAdding upstream version 2:9.1.0377. (diff)
downloadvim-upstream/2%9.1.0496.tar.xz
vim-upstream/2%9.1.0496.zip
Adding upstream version 2:9.1.0496.upstream/2%9.1.0496
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/testdir/test_shortpathname.vim')
-rw-r--r--src/testdir/test_shortpathname.vim22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/testdir/test_shortpathname.vim b/src/testdir/test_shortpathname.vim
index 5964630..0c41692 100644
--- 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,7 +83,8 @@ func Test_ColonEight()
endfunc
func Test_ColonEight_MultiByte()
- let dir = 'Xtest'
+ let dir = 'c:/Xtest_C8MB'
+ call s:SetupDir(dir)
let file = dir . '/日本語のファイル.txt'