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-trailers.lua')
| -rw-r--r-- | tests/extensions/test-link-trailers.lua | 8 |
1 file changed, 5 insertions, 3 deletions
diff --git a/tests/extensions/test-link-trailers.lua b/tests/extensions/test-link-trailers.lua index 9c3b264..01854a0 100644 --- a/tests/extensions/test-link-trailers.lua +++ b/tests/extensions/test-link-trailers.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(key, text) return h.run({ key, "commit" }, { text }) @@ -17,7 +19,7 @@ end h.equals("an unedited copy leaves a Closes mark as text", render("Closes", "#45"), "#45") -h.load_with(arg[1], { +h.load_with(script, { { "-- { key = \"Closes\"", "{ key = \"Closes\"" }, { "-- { key = \"Bug\"", "{ key = \"Bug\"" }, }) @@ -73,7 +75,7 @@ h.equals("an empty value still answers zero", ret, 0) -- 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 = { { key = \"Ref\", pattern = \"^(%S+)$\", url = \"https://t/%s\" }," } }) +h.load_with(script, { { "local rules = {", "local rules = { { key = \"Ref\", pattern = \"^(%S+)$\", url = \"https://t/%s\" }," } }) out = render("Ref", "a'b%c") h.equals("a captured value is percent-encoded into the url", out, "<a href='https://t/a%27b%25c'>a'b%c</a>") |
