robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. KeyesMerge #40865 from justinmk/fixcif907614088

master
500 B18 linesraw
1local t = require('test.testutil')
2local n = require('test.functional.testnvim')()
3
4local describe, it, before_each = t.describe, t.it, t.before_each
5local clear = n.clear
6local eq, eval = t.eq, n.eval
7
8describe('glob2regpat()', function()
9  before_each(clear)
10
11  it('returns ^$ for empty input', function()
12    eq('^$', eval("glob2regpat('')"))
13  end)
14  it('handles valid input', function()
15    eq('^foo\\.', eval("glob2regpat('foo.*')"))
16    eq('\\.vim$', eval("glob2regpat('*.vim')"))
17  end)
18end)