Merge #6261 from lonerover/vim-ac80999

vim-patch: ac80999,7.4.2185,7.4.2187,7.4.2196
This commit is contained in:
Justin M. Keyes 2017-03-13 03:06:12 +01:00 committed by GitHub
commit 3f555cce3d
2 changed files with 33 additions and 3 deletions

View File

@ -0,0 +1,30 @@
" Test glob2regpat()
func Test_invalid()
call assert_fails('call glob2regpat(1.33)', 'E806:')
call assert_fails('call glob2regpat("}")', 'E219:')
call assert_fails('call glob2regpat("{")', 'E220:')
endfunc
func Test_valid()
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('.*', glob2regpat('**'))
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\\}'))
endif
endfunc

View File

@ -244,7 +244,7 @@ static int included_patches[] = {
// 2199 NA
// 2198 NA
2197,
// 2196,
2196,
// 2195 NA
2194,
// 2193 NA
@ -253,9 +253,9 @@ static int included_patches[] = {
// 2190,
// 2189,
2188,
// 2187,
2187,
// 2186 NA
// 2185,
2185,
// 2184,
2183,
// 2182 NA