refactor(build): include lpeg as a library

This commit is contained in:
bfredl
2023-04-20 13:19:38 +02:00
parent 9f0762f1fe
commit 45bcf83869
19 changed files with 376 additions and 52 deletions

View File

@@ -3031,6 +3031,15 @@ describe('lua stdlib', function()
eq(false, if_nil(d, c))
eq(NIL, if_nil(a))
end)
it('lpeg', function()
eq(5, exec_lua [[
local m = vim.lpeg
return m.match(m.R'09'^1, '4504ab')
]])
eq(4, exec_lua [[ return vim.re.match("abcde", '[a-c]+') ]])
end)
end)
describe('lua: builtin modules', function()