mirror of
https://github.com/vim/vim.git
synced 2025-10-06 05:44:14 -04:00
patch 7.4.2196
Problem: glob2regpat test doesn't test everything on MS-Windows. Solution: Add patterns with backslash handling.
This commit is contained in:
@@ -16,11 +16,15 @@ func Test_valid()
|
|||||||
call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}'))
|
call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}'))
|
||||||
call assert_equal('.*', glob2regpat('**'))
|
call assert_equal('.*', glob2regpat('**'))
|
||||||
|
|
||||||
if has('unix')
|
if exists('+shellslash')
|
||||||
|
call assert_equal('^foo[\/].$', glob2regpat('foo\?'))
|
||||||
|
call assert_equal('^\(foo[\/]\|bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}'))
|
||||||
|
call assert_equal('^[\/]\(foo\|bar[\/]\)$', glob2regpat('\{foo,bar\}'))
|
||||||
|
call assert_equal('^[\/][\/]\(foo\|bar[\/][\/]\)$', glob2regpat('\\{foo,bar\\}'))
|
||||||
|
else
|
||||||
call assert_equal('^foo?$', glob2regpat('foo\?'))
|
call assert_equal('^foo?$', glob2regpat('foo\?'))
|
||||||
call assert_equal('^\(foo,bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}'))
|
call assert_equal('^\(foo,bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}'))
|
||||||
call assert_equal('^{foo,bar}$', glob2regpat('\{foo,bar\}'))
|
call assert_equal('^{foo,bar}$', glob2regpat('\{foo,bar\}'))
|
||||||
call assert_equal('^\\\(foo\|bar\\\)$', glob2regpat('\\{foo,bar\\}'))
|
call assert_equal('^\\\(foo\|bar\\\)$', glob2regpat('\\{foo,bar\\}'))
|
||||||
" todo: Windows
|
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -763,6 +763,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2196,
|
||||||
/**/
|
/**/
|
||||||
2195,
|
2195,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user