diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Move syntax highlighting to a Lua source filter
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0201-limits.sh | 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 18 insertions, 0 deletions
diff --git a/tests/t0201-limits.sh b/tests/t0201-limits.sh index b7d82de..1ab3ce6 100755 --- a/tests/t0201-limits.sh +++ b/tests/t0201-limits.sh @@ -3,6 +3,10 @@ test_description='Check the ref listing and diff size limits' . ./setup.sh +if [ $CGIT_HAS_LUA -eq 1 ]; then + test_set_prereq LUA +fi + # A repo with several branches and tags, one commit with an oversized file # diff beside a small one, and configs that pin tiny limits. test_expect_success 'set up limit fixtures' ' @@ -96,4 +100,18 @@ test_expect_success 'the single-file page is not limited by max-diff-files' ' grep "class=.hunk." tmp ' +# --- The shipped highlight filter degrades to escaped passthrough ----------- +test_expect_success LUA 'highlight filter passes text through without scintillua' ' + { + echo "virtual-root=/" && + echo "cache-size=0" && + echo "source-filter=lua:$(cd ../../extensions && pwd)/syntax-highlight.lua" && + echo "repo.url=limits" && + echo "repo.path=$PWD/repos/limits/.git" + } >hlrc && + CGIT_SCINTILLUA_PATH=/nonexistent CGIT_CONFIG="$PWD/hlrc" \ + QUERY_STRING="url=limits/tree/small.c" cgit >tmp && + grep "int y;" tmp +' + test_done |
