summaryrefslogtreecommitdiff
path: root/tests/package_shell_test.lua
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-05 15:01:53 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-05 15:01:53 +0200
commit408c23872de49f055d886a2eb2a32214df399d53 (patch)
tree611c5648401c0a12cb82d38ba5ce47c9604903ff /tests/package_shell_test.lua
parent1e8322ae5c36d42820b5109544ef0ef5ad3da443 (diff)
Compose entry use case
Diffstat (limited to 'tests/package_shell_test.lua')
-rw-r--r--tests/package_shell_test.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/package_shell_test.lua b/tests/package_shell_test.lua
index 0f783ef..3982d42 100644
--- a/tests/package_shell_test.lua
+++ b/tests/package_shell_test.lua
@@ -31,6 +31,7 @@ local sync_callbacks = {}
local environment = {
cx = { active = { finder = nil, current = {} } },
error = error,
+ getmetatable = getmetatable,
pairs = pairs,
type = type,
ya = {
@@ -40,6 +41,9 @@ local environment = {
assert(type(callback) == "function", "ya.sync requires a function")
return callback
end,
+ input = function()
+ return { recv = function() return nil, 2 end }
+ end,
},
}
@@ -50,8 +54,8 @@ assert(sync_calls == 1, "expected one top-level synchronous transaction")
assert(type(plugin) == "table", "plugin must export a table")
assert(type(plugin.entry) == "function", "plugin must export an entry method")
-local intent = plugin:entry({ args = { "directory" } })
-assert(intent.mode == "directory", "entry shell must load with the bundled runtime")
+local result = plugin:entry({ args = { "directory" } })
+assert(result == 0, "entry shell must load with the bundled runtime")
assert(sync_callbacks[1](nil, "directory", "query") == 0, "commit must guard absent finder state")
print("package shell checks passed")