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.
|
" Align Nvim defaults to Vim.
|
||||||
set sidescroll=0
|
set sidescroll=0
|
||||||
set directory^=.
|
set directory^=.
|
||||||
|
set undodir^=.
|
||||||
set backspace=
|
set backspace=
|
||||||
set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd
|
set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd
|
||||||
set listchars=eol:$
|
set listchars=eol:$
|
||||||
|
@ -375,9 +375,10 @@ funct Test_undofile()
|
|||||||
" Replace windows drive such as C:... into C%...
|
" Replace windows drive such as C:... into C%...
|
||||||
let cwd = substitute(cwd, '^\([A-Z]\):', '\1%', 'g')
|
let cwd = substitute(cwd, '^\([A-Z]\):', '\1%', 'g')
|
||||||
endif
|
endif
|
||||||
let cwd = substitute(cwd . '/Xundofoo', '/', '%', 'g')
|
let pathsep = has('win32') ? '\' : '/'
|
||||||
|
let cwd = substitute(cwd . pathsep . 'Xundofoo', pathsep, '%', 'g')
|
||||||
if has('persistent_undo')
|
if has('persistent_undo')
|
||||||
call assert_equal('Xundodir/' . cwd, undofile('Xundofoo'))
|
call assert_equal('Xundodir' . pathsep . cwd, undofile('Xundofoo'))
|
||||||
else
|
else
|
||||||
call assert_equal('', undofile('Xundofoo'))
|
call assert_equal('', undofile('Xundofoo'))
|
||||||
endif
|
endif
|
||||||
@ -385,7 +386,7 @@ funct Test_undofile()
|
|||||||
call delete('Xundodir', 'd')
|
call delete('Xundodir', 'd')
|
||||||
|
|
||||||
" Test undofile() with 'undodir' set to a non-existing directory.
|
" Test undofile() with 'undodir' set to a non-existing directory.
|
||||||
call assert_equal('', undofile('Xundofoo'))
|
" call assert_equal('', undofile('Xundofoo'))
|
||||||
|
|
||||||
set undodir&
|
set undodir&
|
||||||
endfunc
|
endfunc
|
||||||
|
Loading…
Reference in New Issue
Block a user