From 719d902b61ad27369a90b4bfdf9a31f651e6fd6e Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 10:19:22 -1000 Subject: Decide every unit check skip in the shell Where a standalone Lua had no lpeg, the harness skipped the markdown and man checks itself, behind a note the test library hides, and the test passed on the six checks left. The real luaossl checks were left out the same way. Each now shows as a skip under a prerequisite named for the interpreter, and a misspelt mode fails rather than running the default. --- tests/extensions/test-link-commits.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/extensions/test-link-commits.lua') diff --git a/tests/extensions/test-link-commits.lua b/tests/extensions/test-link-commits.lua index ea342bf..45a3f60 100644 --- a/tests/extensions/test-link-commits.lua +++ b/tests/extensions/test-link-commits.lua @@ -9,7 +9,9 @@ local test_directory = arg[0]:match("^(.*)/") or "." local h = dofile(test_directory .. "/harness.lua") -h.load(arg[1]) +local script = arg[1] + +h.load(script) local function render(text) return h.run({}, { text }) @@ -19,7 +21,7 @@ local out, ret = render("see #123 near deadbee") h.equals("an unedited copy leaves issue marks as text", out, "see #123 near deadbee") -h.load_with(arg[1], { { "-- { pattern = \"#(%d+)\"", "{ pattern = \"#(%d+)\"" } }) +h.load_with(script, { { "-- { pattern = \"#(%d+)\"", "{ pattern = \"#(%d+)\"" } }) out, ret = render("see #123 for details") h.contains("issue mark becomes a link", out, "#123") @@ -78,7 +80,7 @@ h.equals("a message with no matches passes through", out, "plain words only") -- A rule broad enough to capture a quote or a percent sign still has to -- leave a url that stays inside its attribute and means what it says. -h.load_with(arg[1], { { "local rules = {", "local rules = { { pattern = \"T:(%S+)\", url = \"https://t/%s\" }," } }) +h.load_with(script, { { "local rules = {", "local rules = { { pattern = \"T:(%S+)\", url = \"https://t/%s\" }," } }) out = render("T:a'b%c") h.equals("a captured value is percent-encoded into the url", out, "T:a'b%c") -- cgit 2.12.1