diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Say that js may be given more than once
| -rw-r--r-- | MANUAL.txt | 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -rwxr-xr-x | tests/t0101-index.sh | 21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 files changed, 24 insertions, 3 deletions
@@ -313,8 +313,10 @@ include:: js:: Url which specifies the javascript script document to include in all - cgit pages. Default value: "/cgit.js". Setting this to an empty string - will disable generation of the link to this file in the head section. + cgit pages. Default value: "/cgit.js". May be given multiple times, each + script URL path is added in the head section of the document in turn. + Setting this to an empty string will disable generation of the link to + this file in the head section. local-time:: Flag which, if set to "1", makes cgit print commit and tag times in the diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index fce9e99..b2ec813 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -4,7 +4,8 @@ # fixture repository and its description, for the escaping a name with a # plus or a space needs in a link, and for the absence of the tree and log # links that belong to a repository's own pages unless enable-index-links -# asks for them. +# asks for them. The page's head also stands in for every page's, with one +# link per css and js entry. test_description='Check content on index page' . ./setup.sh @@ -28,4 +29,22 @@ test_expect_success 'index links lead to the summary, log and tree' ' grep "href=./foo/log/.>log</a><a class=.button. href=./foo/tree/.>tree<" tmp ' +test_expect_success 'each css and js entry gets a link of its own' ' + { + echo "css=/a.css" && + echo "css=/b.css" && + echo "js=/a.js" && + echo "js=" && + echo "js=/b.js" + } >headrc && + sed "s/^cache-size=.*/cache-size=0/" cgitrc >>headrc && + CGIT_CONFIG="$PWD/headrc" QUERY_STRING="url=" cgit >tmp && + grep "<link rel=.stylesheet. href=./a.css.>" tmp && + grep "<link rel=.stylesheet. href=./b.css.>" tmp && + grep "<script src=" tmp >scripts && + test_line_count = 2 scripts && + grep "/a.js" scripts && + grep "/b.js" scripts +' + test_done |
