patch 9.0.1972: win32: missing '**' expansion test

Commit: 
https://github.com/vim/vim/commit/4a1ad5556423dca5f5b7ee39f143579e67569ae1
Author: Ken Takata <[email protected]>
Date:   Mon Oct 2 21:31:31 2023 +0200

    patch 9.0.1972: win32: missing '**' expansion test
    
    Problem:  win32: missing '**' expansion test (after v9.0.1947)
    Solution: Add test for MS-Windows
    
    win32: Add "**" test
    
    Vim supports "**" on MS-Windows. However, it is not tested by
    `Test_glob_extended_bash`.
    
    Unlike Unix, it doesn't use 'shell' and doesn't support {,} expansion.
    So, I added as a separate test.
    
    related: #13205
    closes: #13250
    
    Signed-off-by: Christian Brabandt <[email protected]>
    Co-authored-by: Ken Takata <[email protected]>

diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index a015c8462..a9c81f4de 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -386,8 +386,8 @@ is to use "path\[[]abc]", this matches the file 
"path\[abc]".
 
                                        *starstar-wildcard*
 Expanding "**" is possible on Unix, Win32, macOS and a few other systems (but
-it may depend on your 'shell' setting. It's known to work correctly for zsh; 
for
-bash this requires at least bash version >= 4.X).
+it may depend on your 'shell' setting on Unix and macOS. It's known to work
+correctly for zsh; for bash this requires at least bash version >= 4.X).
 This allows searching a directory tree.  This goes up to 100 directories deep.
 Note there are some commands where this works slightly differently, see
 |file-searching|.
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index a467e3dc4..bf0bf9036 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -3647,4 +3647,22 @@ func Test_glob_extended_bash()
   let &shell=_shell
 endfunc
 
+" Test for glob() with extended patterns (MS-Windows)
+" Vim doesn't use 'shell' to expand wildcards on MS-Windows.
+" Unlike bash, it doesn't support {,} expansion.
+func Test_glob_extended_mswin()
+  CheckMSWindows
+
+  call mkdir('Xtestglob/foo/bar/src', 'p')
+  call writefile([], 'Xtestglob/foo/bar/src/foo.sh')
+  call writefile([], 'Xtestglob/foo/bar/src/foo.h')
+  call writefile([], 'Xtestglob/foo/bar/src/foo.cpp')
+
+  " Sort output of glob() otherwise we end up with different
+  " ordering depending on whether file system is case-sensitive.
+  let expected = ['Xtestglob/foo/bar/src/foo.cpp', 
'Xtestglob/foo/bar/src/foo.h', 'Xtestglob/foo/bar/src/foo.sh']
+  call assert_equal(expected, sort(glob('Xtestglob/**/foo.*', 0, 1)))
+  call delete('Xtestglob', 'rf')
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index d4cf8cc3b..1eb626423 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1972,
 /**/
     1971,
 /**/

-- 
-- 
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 on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qnOqn-004fIo-Qn%40256bit.org.

Raspunde prin e-mail lui