patch 9.1.2051: tests: fix Test_cd_completion fails in Appveyor
Commit:
https://github.com/vim/vim/commit/679c2c01faab2b2106ecd7c1038efa031158b93b
Author: Muraoka Taro <[email protected]>
Date: Mon Jan 5 08:13:18 2026 +0000
patch 9.1.2051: tests: fix Test_cd_completion fails in Appveyor
Problem: Test_cd_completion test fails in Appveyor. In Appveyor, a path
containing spaces was selected as the test target. But the
comparison failed because spaces were not taken into account
(after v9.1.2050)
Solution: Escape spaces in paths for comparison (Muraoka Taro)
closes: #19087
Signed-off-by: Muraoka Taro <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/testdir/test_cd.vim b/src/testdir/test_cd.vim
index 115688225..6248ee484 100644
--- a/src/testdir/test_cd.vim
+++ b/src/testdir/test_cd.vim
@@ -261,22 +261,28 @@ func Test_cd_completion()
let drive = full[0]
call chdir(saved_cwd)
+ " Spaces are escaped in command line completion. Next, in assert_match(),
+ " the backslash added by the first escape also needs to be escaped
+ " separately, so the escape is doubled.
+ let want_full = escape(escape(full, ' '), '\')
+ let want_dir = escape(escape(dir, ' '), '\')
+
for cmd in ['cd', 'chdir', 'lcd', 'lchdir', 'tcd', 'tchdir']
for sep in [ '/', '\']
" Explicit drive letter
call feedkeys(':' .. cmd .. ' ' .. drive .. ':' .. sep ..
\ partial .. "\<C-A>\<C-B>\"\<CR>", 'tx')
- call assert_match(full, @:)
+ call assert_match(want_full, @:)
" Implicit drive letter
call feedkeys(':' .. cmd .. ' ' .. sep .. partial ..
"\<C-A>\<C-B>\"\<CR>", 'tx')
- call assert_match('/' .. dir .. '/', @:)
+ call assert_match('/' .. want_dir .. '/', @:)
" UNC path
call feedkeys(':' .. cmd .. ' ' .. sep .. sep .. $COMPUTERNAME .. sep
..
\ drive .. '$' .. sep .. partial .."\<C-A>\<C-B>\"\<CR>",
'tx')
- call assert_match('//' .. $COMPUTERNAME .. '/' .. drive .. '$/' .. dir
.. '/' , @:)
+ call assert_match('//' .. $COMPUTERNAME .. '/' .. drive .. '$/' ..
want_dir .. '/' , @:)
endfor
endfor
diff --git a/src/version.c b/src/version.c
index b724308b5..ce0ef75de 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2051,
/**/
2050,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vd3rD-00Gjad-ER%40256bit.org.