1. added a shutdown method for LuaState and DebugLuaState to clean up before shutting down

2. added the capability to set LUA_PATH
3. minor debugging improvement
4. bump up the version to 0.12 because the addition outputRedirect debug message is not compatible with the previous versions
This commit is contained in:
Shu Lei
2007-12-11 01:51:28 +00:00
parent ab8fc4883e
commit 42b94709f0
9 changed files with 94 additions and 28 deletions

View File

@@ -216,7 +216,28 @@ public class LuaJVMTest extends TestCase {
assertEquals("dummy.lua", vm.getScript());
} catch (ParseException e) {
fail("Should never reach this line.");
}
}
args = new String[] { "-LC:\\lua\\scripts", "dummy.lua" };
vm = new StandardLuaJVM();
try {
vm.parse(args);
assertEquals("C:\\lua\\scripts", vm.getLuaPath());
assertEquals("dummy.lua", vm.getScript());
} catch (ParseException e) {
fail("Should never reach this line.");
}
args = new String[] { "-Dport=1044", "-LC:\\lua\\scripts", "dummy.lua" };
vm = new StandardLuaJVM();
try {
vm.parse(args);
assertEquals(1044, vm.getDebugPort());
assertEquals("C:\\lua\\scripts", vm.getLuaPath());
assertEquals("dummy.lua", vm.getScript());
} catch (ParseException e) {
fail("Should never reach this line.");
}
}
public void testRun() {