Skip to content

Commit 91c5262

Browse files
committed
patch 7.4.2196
Problem: glob2regpat test doesn't test everything on MS-Windows. Solution: Add patterns with backslash handling.
1 parent bcc1dcc commit 91c5262

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/testdir/test_glob2regpat.vim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ func Test_valid()
1616
call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}'))
1717
call assert_equal('.*', glob2regpat('**'))
1818

19-
if has('unix')
19+
if exists('+shellslash')
20+
call assert_equal('^foo[\/].$', glob2regpat('foo\?'))
21+
call assert_equal('^\(foo[\/]\|bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}'))
22+
call assert_equal('^[\/]\(foo\|bar[\/]\)$', glob2regpat('\{foo,bar\}'))
23+
call assert_equal('^[\/][\/]\(foo\|bar[\/][\/]\)$', glob2regpat('\\{foo,bar\\}'))
24+
else
2025
call assert_equal('^foo?$', glob2regpat('foo\?'))
2126
call assert_equal('^\(foo,bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}'))
2227
call assert_equal('^{foo,bar}$', glob2regpat('\{foo,bar\}'))
2328
call assert_equal('^\\\(foo\|bar\\\)$', glob2regpat('\\{foo,bar\\}'))
24-
" todo: Windows
2529
endif
2630
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ static char *(features[]) =
763763

764764
static int included_patches[] =
765765
{ /* Add new patch number below this line */
766+
/**/
767+
2196,
766768
/**/
767769
2195,
768770
/**/

0 commit comments

Comments
 (0)