Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Require a whole page when a filter exits early
When a filter cannot run, cgit dies mid-page with its Status line
already out, so the check passed with no filter at all. That is the
case wherever true lives only in /bin, as on busybox. true now comes
from the PATH, and the page has to reach its end.
Diffstat (limited to '')
| -rwxr-xr-x | tests/t0303-robustness.sh | 5 |
1 file changed, 3 insertions, 2 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 07f7c09..5097b87 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -208,11 +208,12 @@ test_expect_success 'a filter that cannot run answers one error page' ' test_expect_success 'a filter that exits without reading does not end cgit' ' { - echo "email-filter=exec:/usr/bin/true" && + echo "email-filter=exec:true" && cat robrc } >truerc && CGIT_CONFIG="$PWD/truerc" QUERY_STRING="url=rob/log/" cgit >tmp && - grep "^Status:" tmp + grep "^Status: 200" tmp && + grep "</html>" tmp ' test_expect_success 'a commit encoding header is read without its newline' ' |
