Fixed issue: #86
This commit is contained in:
@@ -140,6 +140,28 @@ public class FragmentsTest extends TestSuite {
|
||||
"return sum\n");
|
||||
}
|
||||
|
||||
public void testDebugGetInfoLevelZeroReturnsGetInfoFunction() {
|
||||
runFragment(
|
||||
LuaValue.TRUE,
|
||||
"return debug.getinfo(0, 'f').func == debug.getinfo\n");
|
||||
}
|
||||
|
||||
public void testDebugGetInfoInsideHookSeesHookFunction() {
|
||||
runFragment(
|
||||
LuaValue.TRUE,
|
||||
"local ok = false\n" +
|
||||
"local hook\n" +
|
||||
"hook = function()\n" +
|
||||
" local info = debug.getinfo(1, 'f')\n" +
|
||||
" ok = info ~= nil and info.func == hook\n" +
|
||||
" debug.sethook()\n" +
|
||||
"end\n" +
|
||||
"debug.sethook(hook, 'c')\n" +
|
||||
"local function foo() end\n" +
|
||||
"foo()\n" +
|
||||
"return ok\n");
|
||||
}
|
||||
|
||||
public void testLongIntegerLiteralPrecision() {
|
||||
runFragment(
|
||||
LuaValue.varargsOf(new LuaValue[] {
|
||||
|
||||
Reference in New Issue
Block a user