Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Test clone urls made from clone-prefix
| -rwxr-xr-x | tests/t0102-summary.sh | 9 |
1 file changed, 9 insertions, 0 deletions
diff --git a/tests/t0102-summary.sh b/tests/t0102-summary.sh index 819e9ec..bdf3a36 100755 --- a/tests/t0102-summary.sh +++ b/tests/t0102-summary.sh @@ -60,6 +60,15 @@ test_expect_success 'the head links only the clone urls with a scheme' ' test_grep ! "<link rel=.vcs-git. href=.git@" tmp ' +# Without a clone-url, each clone-prefix joined to the repository's url is +# one clone url. +test_expect_success 'clone-prefix gives a clone url per prefix' ' + cgitrc_repo prefixrc foo "clone-prefix=https://a git://b" && + cgit_ok prefixrc "url=foo" >tmp && + test_grep "clone-url.><a rel=.vcs-git. title=.foo Git repository. href=.https://a/foo.>https://a/foo</a>" tmp && + test_grep "clone-url.><a rel=.vcs-git. title=.foo Git repository. href=.https://a/foo.>git://b/foo</a>" tmp +' + # A repository can turn the global clone-url off with an empty one of its own. # Neither its summary nor the page an empty repository gets then draws a Clone # heading over no rows. |
