summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-10 23:02:45 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-10 23:02:45 +0200
commit91c5262b19fd2e558fe87b78c7767c7c5a270be8 (patch)
tree3b93d653a0b7a5c78ef01ddeef4d26a54541718f
parentbcc1dcc981dfc092587d4fbd1327d82a03426c57 (diff)
patch 7.4.2196v7.4.2196
Problem: glob2regpat test doesn't test everything on MS-Windows. Solution: Add patterns with backslash handling.
-rw-r--r--src/testdir/test_glob2regpat.vim8
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/testdir/test_glob2regpat.vim b/src/testdir/test_glob2regpat.vim
index 16d7224256..fdf17946b6 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 4dbba94092..85053e1391 100644
--- a/src/version.c
+++ b/src/version.c
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2196,
+/**/
2195,
/**/
2194,