Diff options
| -rwxr-xr-x | tests/t0303-robustness.sh | 12 |
1 file changed, 7 insertions, 5 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 5ed40ba..4cb922d 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -360,10 +360,10 @@ test_expect_success 'a revision spelled like an option is refused' ' ' test_expect_success 'the blob page reads a file through an annotated tag' ' - git -C repos/rob -c tag.gpgsign=false tag -a -m note ann HEAD && - cgit_rc robrc "url=rob/blob/&h=ann&path=file-1" >tmp && + git -C repos/rob tag -a -m note ann HEAD && + git -C repos/rob cat-file blob ann:file-1 >want && + cgit_ok robrc "url=rob/blob/&h=ann&path=file-1" >tmp && strip_headers <tmp >body && - printf "more\n" >want && test_cmp want body ' @@ -371,11 +371,13 @@ test_expect_success 'the blob page reads a file through an annotated tag' ' # blob page used to answer such a request with the raw commit object. test_expect_success 'the blob page walks a path out of the commit or tag the id names' ' tip=$(git -C repos/rob rev-parse HEAD) && - cgit_rc robrc "url=rob/blob/file-1&id=$tip" >tmp && + git -C repos/rob cat-file blob HEAD:file-1 >want && + cgit_ok robrc "url=rob/blob/file-1&id=$tip" >tmp && strip_headers <tmp >body && test_cmp want body && tag=$(git -C repos/rob rev-parse ann) && - cgit_rc robrc "url=rob/blob/file-1&id=$tag" >tmp && + git -C repos/rob cat-file blob ann:file-1 >want && + cgit_ok robrc "url=rob/blob/file-1&id=$tag" >tmp && strip_headers <tmp >body && test_cmp want body && cgit_rc robrc "url=rob/blob/missing&id=$tip" >tmp && |
