From 2e10380fad682ae291d7888ef9634650a2f14def Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 16:51:31 -1000 Subject: Check the row of a symlink to a large blob The blob came out of a pipeline whose failure would have left it empty and the test passing, and nothing looked at the row itself. head -c is not POSIX either. --- tests/t0303-robustness.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 365c968..7f05dcc 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -743,15 +743,17 @@ test_expect_success 'the about redirect encodes the repository url once' ' ' test_expect_success 'a symlink whose target is a large blob is listed without it' ' - big=$(head -c 5000 /dev/zero | tr "\0" a | git -C repos/rob hash-object -w --stdin) && + printf "%05000d" 0 | tr 0 a >big-target && + big=$(git -C repos/rob hash-object -w --stdin tmp && - grep "biglink" tmp && - ! grep "aaaaaaaaaa" tmp + cgit_ok robrc "url=rob/tree/" >tmp && + test_grep ".*>biglink5000<" tmp && + test_grep ! "aaaaaaaaaa" tmp ' test_expect_success 'a chain of single directories is followed a bounded number of levels' ' -- cgit 2.12.1