diff options
Diffstat (limited to 'tests/t0201-filters.sh')
| -rwxr-xr-x | tests/t0201-filters.sh | 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 5 insertions, 4 deletions
diff --git a/tests/t0201-filters.sh b/tests/t0201-filters.sh index 8d67c4f..444932a 100755 --- a/tests/t0201-filters.sh +++ b/tests/t0201-filters.sh @@ -69,7 +69,8 @@ test "$CGIT_HAS_LUA" -eq 1 && test_set_prereq CGIT_LUA test "$CGIT_HAS_LUA" -eq 1 || say 'cgit built without lua, error page check skipped' # A die inside a lua filter has to reach the visitor as an error page rather -# than being fed back into the filter that just failed. +# than being fed back into the filter that just failed, and the reason goes to +# the log. test_expect_success CGIT_LUA 'a failing lua filter still renders an error page' ' cat >broken.lua <<-\EOF && function filter_open(...) error("boom") end @@ -82,9 +83,9 @@ test_expect_success CGIT_LUA 'a failing lua filter still renders an error page' echo "repo.path=$PWD/repos/foo/.git" && echo "auth-filter=lua:$PWD/broken.lua" } >brokenrc && - CGIT_CONFIG="$PWD/brokenrc" QUERY_STRING="url=foo/commit" cgit >tmp && - grep "Status: 400" tmp && - grep "Lua error in" tmp + CGIT_CONFIG="$PWD/brokenrc" QUERY_STRING="url=foo/commit" cgit >tmp 2>err && + grep "Status: 500" tmp && + grep "Lua error in" err ' test_done |
