diff options
-rw-r--r-- | tests/test-Lua.cc | 8 | ||||
-rw-r--r-- | tests/test-Lua.lua | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/test-Lua.cc b/tests/test-Lua.cc index 60d9239..724369f 100644 --- a/tests/test-Lua.cc +++ b/tests/test-Lua.cc @@ -1,5 +1,6 @@ #include <Main.h> #include <BLua.h> +#include <Input.h> using namespace Balau; @@ -116,7 +117,7 @@ int sLua_ObjectTest::ObjectTest_proceed_statics(Lua & L, int n, int caller) thro if (evt) delete evt; evt = NULL; - if (y < 5) { + if (y < 2) { evt = new Events::Timeout(0.1f); throw EAgain(evt); } @@ -194,6 +195,11 @@ void MainTask::Do() { } TAssert(L.gettop() == 0); + IO<Input> i = new Input("tests/test-Lua.lua"); + i->open(); + L.load(i); + TAssert(L.gettop() == 0); + TAssert(objGotDestroyed == 0); L.load("obj2 = createObjectTest() obj2:destroy()"); TAssert(objGotDestroyed == 1); diff --git a/tests/test-Lua.lua b/tests/test-Lua.lua new file mode 100644 index 0000000..53289a8 --- /dev/null +++ b/tests/test-Lua.lua @@ -0,0 +1 @@ +print "foo" |