aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/setup.vim1
-rw-r--r--src/nvim/testdir/test_undo.vim7
2 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim
index 51bf8ce0fc..b38f50b501 100644
--- a/src/nvim/testdir/setup.vim
+++ b/src/nvim/testdir/setup.vim
@@ -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:$
diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim
index 3dfb190a16..f31499607b 100644
--- a/src/nvim/testdir/test_undo.vim
+++ b/src/nvim/testdir/test_undo.vim
@@ -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