1. bug fix: reset the VM when EOF occurs, which indicates that debug client or debug service exit abnormally

2. make LUA_PATH a system property instead of a command line option to StandardLuaJVM
This commit is contained in:
Shu Lei
2007-12-13 21:41:03 +00:00
parent 976c405033
commit 5612201e43
3 changed files with 10 additions and 12 deletions

View File

@@ -218,22 +218,24 @@ public class LuaJVMTest extends TestCase {
fail("Should never reach this line.");
}
args = new String[] { "-LC:\\lua\\scripts", "dummy.lua" };
System.setProperty("LUA_PATH", "c:/work/CSI/prototypes/uidemo/?.lua");
args = new String[] {"dummy.lua" };
vm = new StandardLuaJVM();
try {
vm.parse(args);
assertEquals("C:\\lua\\scripts", vm.getLuaPath());
assertEquals("c:/work/CSI/prototypes/uidemo/?.lua", 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" };
System.setProperty("LUA_PATH", "c:/work/CSI/prototypes/uidemo/?.lua");
args = new String[] { "-Dport=1044", "dummy.lua" };
vm = new StandardLuaJVM();
try {
vm.parse(args);
assertEquals(1044, vm.getDebugPort());
assertEquals("C:\\lua\\scripts", vm.getLuaPath());
assertEquals("c:/work/CSI/prototypes/uidemo/?.lua", vm.getLuaPath());
assertEquals("dummy.lua", vm.getScript());
} catch (ParseException e) {
fail("Should never reach this line.");