mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.2185
Problem: Test glob2regpat does not test much.
Solution: Add a few more test cases. (Dominique Pelle)
71dd9744cf
This commit is contained in:
parent
ce6d2fbb61
commit
9f13983de2
@ -2,9 +2,21 @@
|
||||
|
||||
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('^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('**'))
|
||||
endfunc
|
||||
|
@ -255,7 +255,7 @@ static int included_patches[] = {
|
||||
2188,
|
||||
// 2187,
|
||||
// 2186 NA
|
||||
// 2185,
|
||||
2185,
|
||||
// 2184,
|
||||
2183,
|
||||
// 2182 NA
|
||||
|
Loading…
Reference in New Issue
Block a user