Permalink
Browse files

patch 7.4.2196

Problem:    glob2regpat test doesn't test everything on MS-Windows.
Solution:   Add patterns with backslash handling.
  • Loading branch information...
1 parent bcc1dcc commit 91c5262b19fd2e558fe87b78c7767c7c5a270be8 @brammool brammool committed Aug 10, 2016
Showing with 8 additions and 2 deletions.
  1. +6 −2 src/testdir/test_glob2regpat.vim
  2. +2 −0 src/version.c
@@ -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
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2196,
+/**/
2195,
/**/
2194,

0 comments on commit 91c5262

Please sign in to comment.