diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0101-index.sh | 21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 20 insertions, 1 deletion
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 |
