diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0303-robustness.sh | 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 15 insertions, 0 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 73c2ca5..5bdb060 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -246,6 +246,21 @@ test_expect_success 'the blob page reads a file through an annotated tag' ' test_cmp want body ' +# The plain page walks a path out of whatever commit the id names, and the +# 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) && + robq "url=rob/blob/file-1&id=$tip" >tmp && + strip_headers <tmp >body && + test_cmp want body && + tag=$(git -C repos/rob rev-parse ann) && + robq "url=rob/blob/file-1&id=$tag" >tmp && + strip_headers <tmp >body && + test_cmp want body && + robq "url=rob/blob/missing&id=$tip" >tmp && + grep "^Status: 404" tmp +' + test_expect_success 'the commit page shows a message whole when text follows its trailers' ' ( cd repos/rob && |
