mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
c15e796211
commit
765d394f18
19
test/functional/legacy/glob2regpat_spec.lua
Normal file
19
test/functional/legacy/glob2regpat_spec.lua
Normal 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)
|
Loading…
Reference in New Issue
Block a user