patch 8.2.0985: simplify() does not remove slashes from "///path"
Problem: Simplify() does not remove slashes from "///path".
Solution: Reduce > 2 slashes to one. (closes #6263)
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 0a4e94e..aad5a8c 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -463,6 +463,10 @@
call assert_equal('/', simplify('/.'))
call assert_equal('/', simplify('/..'))
call assert_equal('/...', simplify('/...'))
+ call assert_equal('//path', simplify('//path'))
+ call assert_equal('/path', simplify('///path'))
+ call assert_equal('/path', simplify('////path'))
+
call assert_equal('./dir/file', './dir/file'->simplify())
call assert_equal('./dir/file', simplify('.///dir//file'))
call assert_equal('./dir/file', simplify('./dir/./file'))
@@ -1355,6 +1359,7 @@
" Test for the inputdialog() function
func Test_inputdialog()
+ set timeout timeoutlen=10
if has('gui_running')
call assert_fails('let v=inputdialog([], "xx")', 'E730:')
call assert_fails('let v=inputdialog("Q", [])', 'E730:')
@@ -1364,6 +1369,7 @@
call feedkeys(":let v=inputdialog('Q:', 'xx', 'yy')\<CR>\<Esc>", 'xt')
call assert_equal('yy', v)
endif
+ set timeout& timeoutlen&
endfunc
" Test for inputlist()
@@ -1916,7 +1922,7 @@
\ ->map({-> v:val.name})
call sort(files)->assert_equal(['bar.txt', 'dir', 'foo.txt'])
- " report brocken link correctly
+ " report broken link correctly
if has("unix")
call writefile([], 'Xdir/abc.txt')
call system("ln -s Xdir/abc.txt Xdir/link")