mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge #6261 from lonerover/vim-ac80999
vim-patch: ac80999,7.4.2185,7.4.2187,7.4.2196
This commit is contained in:
commit
3f555cce3d
30
src/nvim/testdir/test_glob2regpat.vim
Normal file
30
src/nvim/testdir/test_glob2regpat.vim
Normal 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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user