summaryrefslogtreecommitdiff
path: root/tests/package_shell_test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/package_shell_test.lua')
-rw-r--r--tests/package_shell_test.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/package_shell_test.lua b/tests/package_shell_test.lua
index da3ab2b..9330c71 100644
--- a/tests/package_shell_test.lua
+++ b/tests/package_shell_test.lua
@@ -29,6 +29,9 @@ end
local sync_calls = 0
local sync_callbacks = {}
local environment = {
+ error = error,
+ pairs = pairs,
+ type = type,
ya = {
sync = function(callback)
sync_calls = sync_calls + 1
@@ -45,7 +48,9 @@ local plugin = chunk()
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")
-assert(plugin.entry() == nil, "entry shell must load with the bundled runtime")
+
+local intent = plugin:entry({ args = { "directory" } })
+assert(intent.mode == "directory", "entry shell must load with the bundled runtime")
assert(sync_callbacks[1]() == 0, "commit shell must load with the bundled runtime")
print("package shell checks passed")