vim-patch:7.4.2187

Problem:    glob2regpat test fails on Windows.
Solution:   Remove the checks that use backslashes.

7547a78446
This commit is contained in:
lonerover
2017-03-12 11:36:34 +08:00
parent 9f13983de2
commit a4b57c2089
2 changed files with 9 additions and 5 deletions

View File

@@ -9,14 +9,18 @@ endfunc
func Test_valid()
call assert_equal('^foo\.', glob2regpat('foo.*'))
call assert_equal('^foo.$', glob2regpat('foo?'))
call assert_equal('^foo?$', glob2regpat('foo\?'))
call assert_equal('\.vim$', glob2regpat('*.vim'))
call assert_equal('^[abc]$', glob2regpat('[abc]'))
call assert_equal('^foo bar$', glob2regpat('foo\ bar'))
call assert_equal('^foo,bar$', glob2regpat('foo,bar'))
call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}'))
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\\}'))
call assert_equal('.*', glob2regpat('**'))
if has('unix')
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 File

@@ -253,7 +253,7 @@ static int included_patches[] = {
// 2190,
// 2189,
2188,
// 2187,
2187,
// 2186 NA
2185,
// 2184,