Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Set the Lua prerequisite once for every test
setup.sh already asks the binary, so the seven scripts that each turned
the answer into a prerequisite now share one. test-lib names the
missing prerequisite beside every test it skips, so the notes that cgit
lacks Lua go, while the ones announcing a fallback stay. The list of
standalone interpreters moves into lib.sh and matches the versions the
extensions claim directly.
Diffstat (limited to '')
| -rwxr-xr-x | tests/t0501-about-render.sh | 21 |
1 file changed, 6 insertions, 15 deletions
diff --git a/tests/t0501-about-render.sh b/tests/t0501-about-render.sh index 222ddfd..97ac08c 100755 --- a/tests/t0501-about-render.sh +++ b/tests/t0501-about-render.sh @@ -13,10 +13,6 @@ CGIT_TEST_NO_CREATE_REPOS=YesPlease . ./setup.sh . "$TEST_OUTPUT_DIRECTORY/extensions/lib.sh" -interpreters=$(ext_lua_interpreters 5) -test -z "$interpreters" && - say 'no standalone lua on the path, unit checks skipped' - for lua in $interpreters do test_expect_success "unit checks under $lua" " @@ -77,18 +73,13 @@ test_expect_success 'point cgit at it through the about filter' ' EOF ' -if test "$CGIT_HAS_LUA" -eq 1 +if cgit_lua_probe "$PWD/repos/md/.git" lpeg +then + test_set_prereq CGIT_LUA_LPEG +elif test "$CGIT_HAS_LUA" -eq 1 then - test_set_prereq CGIT_LUA - if cgit_lua_probe "$PWD/repos/md/.git" lpeg - then - test_set_prereq CGIT_LUA_LPEG - else - test_set_prereq CGIT_LUA_NOLPEG - say 'cgit lua has no lpeg, expecting the plain text fallback' - fi -else - say 'cgit built without lua, filter checks through cgit skipped' + test_set_prereq CGIT_LUA_NOLPEG + say 'cgit lua has no lpeg, expecting the plain text fallback' fi test_expect_success CGIT_LUA_LPEG 'the about page renders the markdown' ' |
