summaryrefslogtreecommitdiff
path: root/src/lua_event_bridge.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua_event_bridge.zig')
-rw-r--r--src/lua_event_bridge.zig20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lua_event_bridge.zig b/src/lua_event_bridge.zig
index 1fbc82a..f6d67e0 100644
--- a/src/lua_event_bridge.zig
+++ b/src/lua_event_bridge.zig
@@ -738,6 +738,7 @@ test "Lua on-handler fires through the native bus into Lua" {
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -770,6 +771,7 @@ test "Lua-defined component renders lines through the bridged vtable" {
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -807,6 +809,7 @@ test "bridged component render truncates to the width contract" {
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -835,6 +838,7 @@ test "bridged component render error yields a safe fallback line, not a crash" {
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -862,6 +866,7 @@ test "wrap pattern: Lua reads the native default, wraps it, and renders through
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -933,6 +938,7 @@ test "skills-style claim-by-name (ยง7.5) works end-to-end through the Lua bridge
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1008,6 +1014,7 @@ test "native-passthrough get/set round-trip: setComponent(getComponent()) keeps
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1056,6 +1063,7 @@ test "Lua emit drives the native bus (custom event reaches a native handler)" {
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1093,6 +1101,7 @@ test "bridged render: a long error on a NARROW width still satisfies the width c
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1125,6 +1134,7 @@ test "bridged render: non-array / nil / non-string returns each yield a safe fal
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1162,6 +1172,7 @@ test "bridged render: empty array renders zero lines (no fallback)" {
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1189,6 +1200,7 @@ test "bridged render: UTF-8 line truncates on codepoint boundaries to the width"
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1222,6 +1234,7 @@ test "bridged firstLineChanged is cache-derived: append stays near the tail" {
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1270,6 +1283,7 @@ test "bridged firstLineChanged: a mid-line replace reports the changed line, shr
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1317,6 +1331,7 @@ test "bridged handleInput round-trips: a Lua method mutates state the next rende
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1363,6 +1378,7 @@ test "bridged component: invalidate frees the ref+cache eagerly; teardown is lea
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit(); // frees all tracked BridgedComponents
@@ -1396,6 +1412,7 @@ test "lifecycle payload fields marshal to Lua: tool id/delta/input/output, think
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1453,6 +1470,7 @@ test "lifecycle handlers fire for every new event name" {
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1506,6 +1524,7 @@ test "claim-by-name at tool_details swaps over the start default; releasing the
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();
@@ -1613,6 +1632,7 @@ test "intra-emit clobber: two handlers each mint a Lua component in ONE emit; bo
defer c.lua_close(L);
c.luaL_openlibs(L);
lua_bridge.install(L);
+ lua_bridge.installTestPantoTable(L);
var bridge = EventBridge.init(testing.allocator, L);
defer bridge.deinit();