mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.2196
Problem: glob2regpat test doesn't test everything on MS-Windows.
Solution: Add patterns with backslash handling.
91c5262b19
This commit is contained in:
parent
a4b57c2089
commit
013a9f9a04
@ -16,11 +16,15 @@ func Test_valid()
|
|||||||
call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}'))
|
call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}'))
|
||||||
call assert_equal('.*', glob2regpat('**'))
|
call assert_equal('.*', glob2regpat('**'))
|
||||||
|
|
||||||
if has('unix')
|
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?$', glob2regpat('foo\?'))
|
||||||
call assert_equal('^\(foo,bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}'))
|
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('^\\\(foo\|bar\\\)$', glob2regpat('\\{foo,bar\\}'))
|
call assert_equal('^\\\(foo\|bar\\\)$', glob2regpat('\\{foo,bar\\}'))
|
||||||
" todo: Windows
|
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
@ -244,7 +244,7 @@ static int included_patches[] = {
|
|||||||
// 2199 NA
|
// 2199 NA
|
||||||
// 2198 NA
|
// 2198 NA
|
||||||
2197,
|
2197,
|
||||||
// 2196,
|
2196,
|
||||||
// 2195 NA
|
// 2195 NA
|
||||||
2194,
|
2194,
|
||||||
// 2193 NA
|
// 2193 NA
|
||||||
|
Loading…
Reference in New Issue
Block a user