summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-07 06:33:09 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-07 06:33:09 +0200
commit69f37968ab29e963d9163a7e72eca81bff17e3b7 (patch)
treeb9b610ba3602435e5c0c5bb74bc618b1a5a59f26
parent18379e15998e96ca604c10adc6295cc4b89ae8e4 (diff)
Adding LuaHandle support.
m---------Balau0
-rw-r--r--Makefile2
-rw-r--r--src/Dalos-cli.cc2
-rw-r--r--tests/alltests.lua2
-rw-r--r--tests/test2.lua6
5 files changed, 11 insertions, 1 deletions
diff --git a/Balau b/Balau
-Subproject 1a67500d100520dd8be9856f2f57ab8b0fbf90b
+Subproject 24dbb15bf6f2b513e2fb75345345b7b646ff1a8
diff --git a/Makefile b/Makefile
index c91cdec..037cde8 100644
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,7 @@ strip: $(TARGET)
Balau:
$(MAKE) -C Balau
-tests: $(TARGET)
+tests: all
$(MAKE) -C Balau tests
./$(TARGET) tests/alltests.lua tests/runtests.lua
./$(TARGET) tests/alltests.lua -e 'runtests()'
diff --git a/src/Dalos-cli.cc b/src/Dalos-cli.cc
index 5c7cc8a..887d7d1 100644
--- a/src/Dalos-cli.cc
+++ b/src/Dalos-cli.cc
@@ -4,6 +4,7 @@
#include <LuaTask.h>
#include <Input.h>
#include <BStdIO.h>
+#include <LuaHandle.h>
#include "BReadline.h"
#include "LuaLoad.h"
@@ -42,6 +43,7 @@ namespace {
class DalosInit : public LuaExecCell {
virtual void run(Lua & L) override {
registerLuaLoad(L);
+ registerLuaHandle(L);
}
};
diff --git a/tests/alltests.lua b/tests/alltests.lua
index d0feda2..d4088e6 100644
--- a/tests/alltests.lua
+++ b/tests/alltests.lua
@@ -1,5 +1,7 @@
load "tests/test1.lua"
+load "tests/test2.lua"
function runtests()
test1()
+ test2()
end
diff --git a/tests/test2.lua b/tests/test2.lua
new file mode 100644
index 0000000..d023ba5
--- /dev/null
+++ b/tests/test2.lua
@@ -0,0 +1,6 @@
+function test2()
+ local i = Input.new "tests/test1.lua"
+ i:open()
+ i:close()
+ i:destroy()
+end