diff options
context:
space:
mode:
Diffstat (limited to 'tests/t0010-validate-html.sh')
-rwxr-xr-xtests/t0010-validate-html.sh11
1 file changed, 11 insertions, 0 deletions
diff --git a/tests/t0010-validate-html.sh b/tests/t0010-validate-html.sh
index ca08d69..91433f8 100755
--- a/tests/t0010-validate-html.sh
+++ b/tests/t0010-validate-html.sh
@@ -29,6 +29,17 @@ test -n "$tidy" || {
exit
}
+# Releases of tidy that predate HTML5 reject the semantic elements (header,
+# nav, main, footer) that cgit emits, reporting them as errors. Skip the
+# validation unless tidy is new enough to understand them.
+printf '<!DOCTYPE html>\n<html lang="en"><head><title>t</title></head><body><header>x</header></body></html>\n' \
+ | "$tidy" -q -e >/dev/null 2>&1
+test $? -ge 2 && {
+ skip_all='Skipping html validation tests: tidy is too old for HTML5'
+ test_done
+ exit
+}
+
test_expect_success 'index page' 'test_url ""'
test_expect_success 'foo' 'test_url "foo"'
test_expect_success 'foo/log' 'test_url "foo/log"'