Simplify layout of lua test script locations.

This commit is contained in:
James Roseborough
2012-09-07 14:05:41 +00:00
parent 3bacea878e
commit f2d1106fe5
27 changed files with 151 additions and 166 deletions

View File

@@ -100,9 +100,9 @@ end
local function eval( expr, script )
script = script or ('return '..expr)
local s,a,b = loadstring( script, 'expr' )
local s,a,b = load( script, 'expr' )
if s then print( expr, pcall( s ) )
else print( expr, 'loadstring:', a ) end
else print( expr, 'load:', a ) end
end
-- misc tests
@@ -191,7 +191,7 @@ end
-- random tests
print("----------- Random number tests")
local function testrandom(string,lo,hi)
local c,e = loadstring('return '..string)
local c,e = load('return '..string)
for i=1,5 do
local s,e = pcall(c)
if s then