mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
file_pat_to_reg_pat(): handle empty string.
This commit is contained in:
committed by
Justin M. Keyes
parent
894fcb778e
commit
db77b7bc9e
@@ -12,8 +12,8 @@ describe('glob2regpat()', function()
|
||||
helpers.feed('<cr>')
|
||||
neq(nil, string.find(eval('v:errmsg'), '^E806:'))
|
||||
end)
|
||||
it('returns empty string for empty input', function()
|
||||
eq('', eval("glob2regpat('')"))
|
||||
it('returns ^$ for empty input', function()
|
||||
eq('^$', eval("glob2regpat('')"))
|
||||
end)
|
||||
it('handles valid input', function()
|
||||
eq('^foo\\.', eval("glob2regpat('foo.*')"))
|
||||
|
||||
Reference in New Issue
Block a user