summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNicolas Noble <pixel@nobis-crew.org>2013-07-30 18:26:05 -0700
committerNicolas Noble <pixel@nobis-crew.org>2013-07-30 18:26:12 -0700
commitbabb39375916dc114d3413aa52c9a2c543cad2af (patch)
tree677aa49b1c1d1d5cabd6b8938e1092684834504e /tests
parent1524f8eb8ca237ad8c02ae348cc8cb60276dbb15 (diff)
Tweaking the basic Lua test a bit.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-Lua.cc8
-rw-r--r--tests/test-Lua.lua1
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"