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:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user