patch 8.1.1352: undofile() reports wrong name
Problem: Undofile() reports wrong name. (Francisco Giordano)
Solution: Clean up the name before changing path separators. (closes #4392,
closes #4394)
diff --git a/src/testdir/test_undo.vim b/src/testdir/test_undo.vim
index 7c93e23..ba1c861 100644
--- a/src/testdir/test_undo.vim
+++ b/src/testdir/test_undo.vim
@@ -440,5 +440,10 @@
" Test undofile() with 'undodir' set to a non-existing directory.
call assert_equal('', undofile('Xundofoo'))
+ if isdirectory('/tmp')
+ set undodir=/tmp
+ call assert_equal('/tmp/%tmp%file', undofile('///tmp/file'))
+ endif
+
set undodir&
endfunc