diff options
context:
space:
mode:
Diffstat (limited to 'tests/t0303-robustness.sh')
-rwxr-xr-xtests/t0303-robustness.sh13
1 file changed, 13 insertions, 0 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh
index be98644..73c2ca5 100755
--- a/tests/t0303-robustness.sh
+++ b/tests/t0303-robustness.sh
@@ -507,6 +507,19 @@ test_expect_success 'the dumb transport withholds the alternates file' '
grep "^Status: 200" tmp
'
+# The about page redirects to its trailing-slash form so relative links
+# resolve, and the branch asked for has to survive that hop, as does the
+# hop back to the summary of a repository without a readme.
+test_expect_success 'the about redirects keep the query string' '
+ git -C repos/rob branch other HEAD &&
+ CGIT_CONFIG="$PWD/aboutrc" QUERY_STRING="url=rob/about&h=other&x=1" cgit >tmp &&
+ grep "^Status: 301" tmp &&
+ grep "^Location: /rob/about/?h=other&x=1$" tmp &&
+ robq "url=rob/about/&h=other" >tmp &&
+ grep "^Status: 302" tmp &&
+ grep "^Location: /rob/about/../?h=other$" tmp
+'
+
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) &&
(