Diff options
Diffstat (limited to '')
-rwxr-xr-xtests/t0501-about-render.sh25
1 file changed, 8 insertions, 17 deletions
diff --git a/tests/t0501-about-render.sh b/tests/t0501-about-render.sh
index 339c5e2..e4eaf5c 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' '
@@ -109,13 +100,13 @@ test_expect_success CGIT_LUA_LPEG 'a relative link leads into the tree' '
'
test_expect_success CGIT_LUA_LPEG 'the link stays on the branch shown' '
- cgit_query "url=md/about/&h=next" >tmp &&
+ cgit_url "md/about/&h=next" >tmp &&
grep "<a href=./md/tree/ROADMAP.md?h=next#plan.>roadmap</a>" tmp
'
test_expect_success CGIT_LUA_LPEG 'the about page renders a man page' '
cgit_url "man/about/" >tmp &&
- grep "<div class=.markdown manpage.><h2 id=.name.>NAME</h2>" tmp &&
+ grep "<div class=.markdown.><h2 id=.name.>NAME</h2>" tmp &&
grep "tool - does one thing — well" tmp &&
grep "<strong>-v</strong><br>" tmp &&
grep "<pre><code>tool -v &lt;file&gt;" tmp &&