summaryrefslogtreecommitdiff
path: root/bindings/lua/lunitx/lunitx.lua
diff options
context:
space:
mode:
authorJosh Haberman <haberman@google.com>2013-02-15 16:27:18 -0800
committerJosh Haberman <haberman@google.com>2013-02-15 16:27:18 -0800
commit7d3e2bd2c4cfd1296d1d6f996d7548de26540d41 (patch)
treeb4b35967b3322c65cfb1a32220e8718de09d85fc /bindings/lua/lunitx/lunitx.lua
parentea198bdcf947ba4bd51474bdd4f7b82b5e4cf41d (diff)
Sync with 8 months of Google-internal development.
Many things have changed and been simplified. The memory-management story for upb_def and upb_handlers is much more robust; upb_def and upb_handlers should be fairly stable interfaces now. There is still much work to do for the runtime component (upb_sink).
Diffstat (limited to 'bindings/lua/lunitx/lunitx.lua')
-rw-r--r--bindings/lua/lunitx/lunitx.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/bindings/lua/lunitx/lunitx.lua b/bindings/lua/lunitx/lunitx.lua
new file mode 100644
index 0000000..7656e6a
--- /dev/null
+++ b/bindings/lua/lunitx/lunitx.lua
@@ -0,0 +1,21 @@
+local atexit = require "atexit"
+local lunit = require "lunit"
+
+--for k,v in pairs(debug.getinfo(1,"S")) do print(k,v) end
+-- autonameing
+-- module("bcrc-test", lunit.testcase, package.seeall)
+
+atexit(function()
+ local _, emsg = xpcall(function()
+ lunit.main(arg)
+ end, debug.traceback)
+ if emsg then
+ print(emsg)
+ os.exit(1)
+ end
+ if lunit.stats.failed > 0 or lunit.stats.errors > 0 then
+ os.exit(1)
+ end
+end)
+
+return lunit
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback