diff options
Diffstat (limited to 'tests/package_shell_test.lua')
| -rw-r--r-- | tests/package_shell_test.lua | 8 |
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") |