mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
oldtests: Test_undofile() passes
Set undodir to Vim's default value. Fix pathsep of expected undofile path for Windows. Comment out invalid test case for Neovim.
This commit is contained in:
parent
1c1722105c
commit
09c2184660
@ -9,6 +9,7 @@ let s:did_load = 1
|
||||
" Align Nvim defaults to Vim.
|
||||
set sidescroll=0
|
||||
set directory^=.
|
||||
set undodir^=.
|
||||
set backspace=
|
||||
set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd
|
||||
set listchars=eol:$
|
||||
|
@ -375,9 +375,10 @@ funct Test_undofile()
|
||||
" Replace windows drive such as C:... into C%...
|
||||
let cwd = substitute(cwd, '^\([A-Z]\):', '\1%', 'g')
|
||||
endif
|
||||
let cwd = substitute(cwd . '/Xundofoo', '/', '%', 'g')
|
||||
let pathsep = has('win32') ? '\' : '/'
|
||||
let cwd = substitute(cwd . pathsep . 'Xundofoo', pathsep, '%', 'g')
|
||||
if has('persistent_undo')
|
||||
call assert_equal('Xundodir/' . cwd, undofile('Xundofoo'))
|
||||
call assert_equal('Xundodir' . pathsep . cwd, undofile('Xundofoo'))
|
||||
else
|
||||
call assert_equal('', undofile('Xundofoo'))
|
||||
endif
|
||||
@ -385,7 +386,7 @@ funct Test_undofile()
|
||||
call delete('Xundodir', 'd')
|
||||
|
||||
" Test undofile() with 'undodir' set to a non-existing directory.
|
||||
call assert_equal('', undofile('Xundofoo'))
|
||||
" call assert_equal('', undofile('Xundofoo'))
|
||||
|
||||
set undodir&
|
||||
endfunc
|
||||
|
Loading…
Reference in New Issue
Block a user