Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
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.
Diffstat (limited to 'tests/extensions/test-link-commits.lua')
| -rw-r--r-- | tests/extensions/test-link-commits.lua | 8 |
1 file changed, 5 insertions, 3 deletions
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 <a href='./?id=deadbee'>deadbee</a>") -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, "<a href='https://bugs.example.com/?bug=123'>#123</a>") @@ -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, "<a href='https://t/a%27b%25c'>T:a'b%c</a>") |
