diff options
Diffstat (limited to 'tests/t0204-limits.sh')
-rwxr-xr-xtests/t0204-limits.sh13
1 file changed, 13 insertions, 0 deletions
diff --git a/tests/t0204-limits.sh b/tests/t0204-limits.sh
index 19df797..245c016 100755
--- a/tests/t0204-limits.sh
+++ b/tests/t0204-limits.sh
@@ -165,6 +165,19 @@ test_expect_success 'a diff of an oversized blob is not inlined' '
! grep "aaaaaaaa" tmp
'
+test_expect_success 'every page showing a blob refuses an oversized one alike' '
+ {
+ echo "enable-blame=1" &&
+ cat blobdiffrc
+ } >blobpagesrc &&
+ for page in tree plain blob blame
+ do
+ CGIT_CONFIG="$PWD/blobpagesrc" QUERY_STRING="url=blobdiff/$page/big.txt" cgit >tmp &&
+ grep "^Status: 413 Content Too Large" tmp &&
+ grep "Blob size (3 KB) exceeds the limit (1 KB)" tmp || return 1
+ done
+'
+
# A missing scintillua leaves the shipped filter with nothing to highlight
# with, and a filter that failed there would take the whole page down with
# it, so it has to hand the source back escaped instead.