New LuaCompat add-on provides some standard lua functions that allow the

test cases to make more progress: assert, collectgarbage, loadfile,
tonumber, rawget, and setfenv. Also added zip file of standard tests to
Eclipse classpath, for convenience.
This commit is contained in:
Ian Farmer
2007-07-22 05:47:14 +00:00
parent e1d6ddf99c
commit daf71ee672
3 changed files with 199 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ import junit.framework.TestCase;
import junit.framework.TestSuite;
import lua.Builtin;
import lua.StackState;
import lua.addon.luacompat.LuaCompat;
import lua.io.Closure;
import lua.io.LoadState;
import lua.io.Proto;
@@ -68,6 +69,8 @@ public class StandardTest extends TestCase {
}
public void runTest() {
GlobalState.resetGlobals();
LuaCompat.install();
StackState state = new StackState();
Closure c = new Closure( state, code );