]> granicus.if.org Git - vim/commitdiff
patch 7.4.2196 v7.4.2196
authorBram Moolenaar <Bram@vim.org>
Wed, 10 Aug 2016 21:02:45 +0000 (23:02 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 10 Aug 2016 21:02:45 +0000 (23:02 +0200)
Problem:    glob2regpat test doesn't test everything on MS-Windows.
Solution:   Add patterns with backslash handling.

src/testdir/test_glob2regpat.vim
src/version.c

index 16d7224256a5a393c39d08e6e8bb59a8ab78e62f..fdf17946b63f386052c934ee79e5edeca247a720 100644 (file)
@@ -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
index 4dbba940928059c7abcdbe954b610c8adc5e217c..85053e1391fbcdb353105a8ec809cc9605afcce4 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2196,
 /**/
     2195,
 /**/