diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Give an empty repository's clone table its hooks
It was a bare table.list with no name, section or label, the one listing that broke what the README promises a theme.
Diffstat (limited to 'tests/t0005-markup.sh')
-rwxr-xr-xtests/t0005-markup.sh16
1 file changed, 13 insertions, 3 deletions
diff --git a/tests/t0005-markup.sh b/tests/t0005-markup.sh
index bbf78b1..e3cb08d 100755
--- a/tests/t0005-markup.sh
+++ b/tests/t0005-markup.sh
@@ -97,8 +97,9 @@ test_expect_success 'the stylesheet and the script name only the current hooks'
'
# The rest of the hooks need a tag, a symlink, a submodule, a trailer, clone
-# urls and a second page of repositories, so they get a commit and a config
-# of their own after the checks above have read the first ones.
+# urls, an empty repository and a second page of repositories, so they get a
+# commit and a config of their own after the checks above have read the first
+# ones.
test_expect_success 'set up the remaining kinds of entry' '
(
cd repos/hooks &&
@@ -107,6 +108,7 @@ test_expect_success 'set up the remaining kinds of entry' '
git update-index --add --cacheinfo "160000,$(git rev-parse HEAD),sub" &&
git commit -m "more kinds of entry" -m "Fixes: $(git rev-parse --short HEAD)"
) &&
+ git init -q --bare repos/empty.git &&
{
echo "virtual-root=/" &&
echo "cache-size=0" &&
@@ -116,7 +118,9 @@ test_expect_success 'set up the remaining kinds of entry' '
echo "repo.url=hooks" &&
echo "repo.path=$PWD/repos/hooks/.git" &&
echo "repo.url=again" &&
- echo "repo.path=$PWD/repos/hooks/.git"
+ echo "repo.path=$PWD/repos/hooks/.git" &&
+ echo "repo.url=empty" &&
+ echo "repo.path=$PWD/repos/empty.git"
} >morerc
'
@@ -160,6 +164,12 @@ test_expect_success 'a date shown in full is a plain time element' '
! grep "data-ut=" tmp
'
+test_expect_success 'an empty repository lists its clone urls as a clone table' '
+ more "empty/" >tmp &&
+ grep "<table class=.list clone. aria-label=.Clone urls.>" tmp &&
+ grep "<tbody class=.clone.>" tmp
+'
+
test_expect_success 'embedded mode marks the root' '
{
echo "embedded=1" &&