vim-patch:8.1.0585: undo test may fail on MS-Windows

Problem:    Undo test may fail on MS-Windows.
Solution:   Also handle lower case drive letters.
56242f2b08
This commit is contained in:
Jan Edmund Lazo
2018-12-14 22:41:42 -05:00
parent c16529afa5
commit bcc9b9335c

View File

@@ -373,7 +373,7 @@ funct Test_undofile()
let cwd = getcwd()
if has('win32')
" Replace windows drive such as C:... into C%...
let cwd = substitute(cwd, '^\([A-Z]\):', '\1%', 'g')
let cwd = substitute(cwd, '^\([a-zA-Z]\):', '\1%', 'g')
endif
let pathsep = has('win32') ? '\' : '/'
let cwd = substitute(cwd . pathsep . 'Xundofoo', pathsep, '%', 'g')