diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0303-robustness.sh | 14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 14 insertions, 0 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 2e0e849..da5e209 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -639,6 +639,20 @@ test_expect_success 'the about redirect keeps the query string' ' grep "^Status: 200" tmp ' +# A readme named without a branch is read from the head being browsed, and an +# annotated tag reaches its commit only through the tag object. +test_expect_success 'the readme follows an annotated tag as the head' ' + git -C repos/rob tag -a -m release v1 HEAD && + { + cat robrc && + echo "repo.readme=:file-1" + } >tagreadmerc && + CGIT_CONFIG="$PWD/tagreadmerc" QUERY_STRING="url=rob/about/&h=v1" cgit >tmp && + grep "^Status: 200" tmp && + CGIT_CONFIG="$PWD/tagreadmerc" QUERY_STRING="url=rob/tree/&h=v1" cgit >tmp && + grep ">about<" tmp +' + test_expect_success 'the about redirect encodes the repository url once' ' cgit_url "foo%2Bbar/about/" >tmp && grep "^Status: 302" tmp && |
