mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00: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:
@@ -2,9 +2,21 @@
|
|||||||
|
|
||||||
func Test_invalid()
|
func Test_invalid()
|
||||||
call assert_fails('call glob2regpat(1.33)', 'E806:')
|
call assert_fails('call glob2regpat(1.33)', 'E806:')
|
||||||
|
call assert_fails('call glob2regpat("}")', 'E219:')
|
||||||
|
call assert_fails('call glob2regpat("{")', 'E220:')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_valid()
|
func Test_valid()
|
||||||
call assert_equal('^foo\.', glob2regpat('foo.*'))
|
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('\.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
|
endfunc
|
||||||
|
@@ -255,7 +255,7 @@ static int included_patches[] = {
|
|||||||
2188,
|
2188,
|
||||||
// 2187,
|
// 2187,
|
||||||
// 2186 NA
|
// 2186 NA
|
||||||
// 2185,
|
2185,
|
||||||
// 2184,
|
// 2184,
|
||||||
2183,
|
2183,
|
||||||
// 2182 NA
|
// 2182 NA
|
||||||
|
Reference in New Issue
Block a user