From 8c8c6fb05a993574abfa58784c62a1b983565785 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 13 Oct 2024 18:31:36 +0800 Subject: vim-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 vim/vim#6263) https://github.com/vim/vim/commit/fdcbe3c3fedf48a43b22938c9331addb2f1182f1 Omit Test_readdirex() change: changed again in patch 9.0.0323. Co-authored-by: Bram Moolenaar --- test/old/testdir/test_functions.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim index 143fdc8073..2bf2f78aa0 100644 --- a/test/old/testdir/test_functions.vim +++ b/test/old/testdir/test_functions.vim @@ -383,6 +383,10 @@ func Test_simplify() 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')) @@ -2069,6 +2073,7 @@ endfunc " 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:') @@ -2078,6 +2083,7 @@ func Test_inputdialog() call feedkeys(":let v=inputdialog('Q:', 'xx', 'yy')\\", 'xt') call assert_equal('yy', v) endif + set timeout& timeoutlen& endfunc " Test for inputlist() -- cgit