From e35bed7d43c77e5db2dbdd3953f9388d0655a9f6 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 09:03:41 -1000 Subject: Show a blob at exactly max-blob-size No fixture's size in whole kilobytes equalled the limit, so turning the comparison into greater or equal passed every test. --- tests/t0204-limits.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/t0204-limits.sh b/tests/t0204-limits.sh index 7361048..5250811 100755 --- a/tests/t0204-limits.sh +++ b/tests/t0204-limits.sh @@ -194,6 +194,20 @@ test_expect_success 'every page showing a blob refuses an oversized one alike' ' done ' +# The limit is in whole kilobytes, so a blob of exactly that size is still +# within it. +test_expect_success 'a blob of exactly max-blob-size is shown' ' + printf "%01023d\n" 0 >repos/blobdiff/exact.txt && + test $(wc -c tmp && + test_grep "00000000" tmp || return 1 + done +' + # The patch and rawdiff pages hand the work to git, whose own limit on an # inlined blob is far past max-blob-size, so the cap is passed through to it. test_expect_success 'patch and rawdiff show an oversized blob as binary' ' -- cgit 2.12.1