Diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0204-limits.sh | 11 |
1 file changed, 11 insertions, 0 deletions
diff --git a/tests/t0204-limits.sh b/tests/t0204-limits.sh index ecc33bf..9b0488c 100755 --- a/tests/t0204-limits.sh +++ b/tests/t0204-limits.sh @@ -135,6 +135,17 @@ test_expect_success 'the single-file page is not limited by max-diff-files' ' grep "class=.hunk." tmp ' +# The patch the notice links to has to hold the change the page compared, +# both ends of a range and a branch other than the default. +test_expect_success 'the stat only notice links the patch of the same change' ' + new=$(git -C repos/limits rev-parse HEAD) && + old=$(git -C repos/limits rev-parse HEAD~2) && + cgit_rc limitfilesrc "url=limits/diff/&id=$new&id2=$old" >tmp && + grep "href=./limits/patch/?id=$new&id2=$old.>patch</a> link" tmp && + cgit_rc limitfilesrc "url=limits/diff/&h=branch-1" >tmp && + grep "href=./limits/patch/?h=branch-1.>patch</a> link" tmp +' + # The diff views must not inflate a blob past max-blob-size merely to render # it, which is the same defence the tree and plain views make and is easy to # miss on this path. Such a file is reported as binary instead. |
