Add precompiled expected results to test suite.

This commit is contained in:
James Roseborough
2012-09-06 14:00:32 +00:00
parent 29e2a3d61f
commit d5ac153dca
5 changed files with 31 additions and 14 deletions

View File

@@ -21,8 +21,7 @@ t[2] = [[
]]
for i = 3, 199 do
t[i] = template:gsub("<([^>]+)>", function(s)
local c = assert(loadstring('return '..s), 'could not compile: '..s)
setfenv(c, { i = i })
local c = assert(load('return '..s, 'f'..i, 'bt', { i = i }), 'could not compile: '..s)
return c()
end)
end