From: Bram Moolenaar Date: Wed, 10 Aug 2016 21:02:45 +0000 (+0200) Subject: patch 7.4.2196 X-Git-Tag: v7.4.2196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91c5262b19fd2e558fe87b78c7767c7c5a270be8;p=vim patch 7.4.2196 Problem: glob2regpat test doesn't test everything on MS-Windows. Solution: Add patterns with backslash handling. --- diff --git a/src/testdir/test_glob2regpat.vim b/src/testdir/test_glob2regpat.vim index 16d722425..fdf17946b 100644 --- a/src/testdir/test_glob2regpat.vim +++ b/src/testdir/test_glob2regpat.vim @@ -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 diff --git a/src/version.c b/src/version.c index 4dbba9409..85053e139 100644 --- a/src/version.c +++ b/src/version.c @@ -763,6 +763,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2196, /**/ 2195, /**/