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/t0501-about-render.sh')
| -rwxr-xr-x | tests/t0501-about-render.sh | 15 |
1 file changed, 8 insertions, 7 deletions
diff --git a/tests/t0501-about-render.sh b/tests/t0501-about-render.sh index 95028f0..af68260 100755 --- a/tests/t0501-about-render.sh +++ b/tests/t0501-about-render.sh @@ -2,11 +2,11 @@ # Checks about-render.lua, the shipped about-filter. The unit checks drive # the script under every suitable standalone Lua through the harness in -# extensions/, once as installed and once with lpeg forced away so the -# plain text fallback is proven everywhere. A repository with a markdown -# readme is then rendered through cgit itself, where the outcome depends on -# whether the Lua inside the binary has lpeg, so a probe decides which of -# the two right answers to expect. +# extensions/, once with lpeg wherever that interpreter has it and once with +# lpeg forced away so the plain text fallback is proven everywhere. A +# repository with a markdown readme is then rendered through cgit itself, +# where the outcome depends on whether the Lua inside the binary has lpeg, so +# a probe decides which of the two right answers to expect. test_description='Check the shipped about-render extension' CGIT_TEST_NO_CREATE_REPOS=YesPlease @@ -15,8 +15,9 @@ CGIT_TEST_NO_CREATE_REPOS=YesPlease for lua in ${interpreters:-lua} do - test_expect_success STANDALONE_LUA "unit checks under $(lua_version "$lua")" ' - "$lua" "$EXT_TEST_DIRECTORY/test-about-render.lua" "$EXTENSIONS_DIRECTORY/about-render.lua" + lua_module_prereq "$lua" lpeg + test_expect_success "STANDALONE_LUA,$lua_prereq" "unit checks under $(lua_version "$lua")" ' + "$lua" "$EXT_TEST_DIRECTORY/test-about-render.lua" "$EXTENSIONS_DIRECTORY/about-render.lua" lpeg ' test_expect_success STANDALONE_LUA "fallback checks without lpeg under $(lua_version "$lua")" ' |
