# HG changeset patch # User Christian Brabandt # Date 1470863706 -7200 # Node ID f8396c6e5709c3b18ba8d525d49eabd2c01476c7 # Parent 736f093f34946f10b4cfd19e2cec44ec30e90b12 commit https://github.com/vim/vim/commit/91c5262b19fd2e558fe87b78c7767c7c5a270be8 Author: Bram Moolenaar Date: Wed Aug 10 23:02:45 2016 +0200 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 --- 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 --- 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,