Skip to content

Commit

Permalink
patch 7.4.2196
Browse files Browse the repository at this point in the history
Problem:    glob2regpat test doesn't test everything on MS-Windows.
Solution:   Add patterns with backslash handling.
  • Loading branch information
brammool committed Aug 10, 2016
1 parent bcc1dcc commit 91c5262
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/testdir/test_glob2regpat.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ func Test_valid()
call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}'))
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,bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}'))
call assert_equal('^{foo,bar}$', glob2regpat('\{foo,bar\}'))
call assert_equal('^\\\(foo\|bar\\\)$', glob2regpat('\\{foo,bar\\}'))
" todo: Windows
endif
endfunc
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2196,
/**/
2195,
/**/
Expand Down

0 comments on commit 91c5262

Please sign in to comment.