diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Name the log link that enable-index-links adds
The manual has named the commit page since it was written in 2008, a year after the index started linking the log instead.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/t0101-index.sh11
1 file changed, 10 insertions, 1 deletion
diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh
index 60f71e8..fce9e99 100755
--- a/tests/t0101-index.sh
+++ b/tests/t0101-index.sh
@@ -3,7 +3,8 @@
# The index page, one row per repository in cgitrc. The checks look for each
# 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.
+# links that belong to a repository's own pages unless enable-index-links
+# asks for them.
test_description='Check content on index page'
. ./setup.sh
@@ -19,4 +20,12 @@ test_expect_success 'verify "with%20space" link' 'grep "/with%20space/" tmp'
test_expect_success 'no tree-link' '! grep "foo/tree" tmp'
test_expect_success 'no log-link' '! grep "foo/log" tmp'
+test_expect_success 'index links lead to the summary, log and tree' '
+ echo "enable-index-links=1" >links-cgitrc &&
+ sed "s/^cache-size=.*/cache-size=0/" cgitrc >>links-cgitrc &&
+ CGIT_CONFIG="$PWD/links-cgitrc" QUERY_STRING="url=" cgit >tmp &&
+ grep ">summary</a><a class=.button. href=./foo/log/.>log</a>" tmp &&
+ grep "href=./foo/log/.>log</a><a class=.button. href=./foo/tree/.>tree<" tmp
+'
+
test_done