From 0e12fe5bfefa9695a685af4fe5ea5259696c20b4 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Sat, 5 Sep 2026 13:57:25 +0200 Subject: Validate entry arguments --- tests/package_shell_test.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/package_shell_test.lua') 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") -- cgit v1.2.3