Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
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.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0303-robustness.sh | 10 |
1 file changed, 6 insertions, 4 deletions
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 <big-target) && + test $(git -C repos/rob cat-file -s $big) = 5000 && ( cd repos/rob && git update-index --add --cacheinfo 120000,$big,biglink && git commit -m biglink ) && - cgit_rc robrc "url=rob/tree/" >tmp && - grep "biglink" tmp && - ! grep "aaaaaaaaaa" tmp + cgit_ok robrc "url=rob/tree/" >tmp && + test_grep "<tr class=.link.>.*>biglink</a></td><td class=.ls-size.>5000<" tmp && + test_grep ! "aaaaaaaaaa" tmp ' test_expect_success 'a chain of single directories is followed a bounded number of levels' ' |
