vim-patch:ac809999

ac80999985
This commit is contained in:
Justin M. Keyes 2016-01-27 03:19:23 -05:00
parent c15e796211
commit 765d394f18

View File

@ -0,0 +1,19 @@
-- Tests for signs
local helpers = require('test.functional.helpers')
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
local eq, neq, eval = helpers.eq, helpers.neq, helpers.eval
describe('glob2regpat()', function()
before_each(clear)
it('handles invalid input', function()
execute('call glob2regpat(1.33)')
helpers.feed('<cr>')
neq(nil, string.find(eval('v:errmsg'), '^E806:'))
end)
it('handles valid input', function()
eq('^foo\\.', eval("glob2regpat('foo.*')"))
eq('\\.vim$', eval("glob2regpat('*.vim')"))
end)
end)