aboutsummaryrefslogtreecommitdiffstats
path: root/t.validate-xhtml
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-03-05 23:07:06 +0100
committerMatthias Andree <matthias.andree@gmx.de>2010-03-05 23:07:06 +0100
commit86c5e63d7cccacc5388b0e2fa4cbd22191e4ca3b (patch)
tree0b48bd0685fe74f0e7a312a090ad70d89c3e3dfb /t.validate-xhtml
parentc116e68a05e2feb9a0c8e735aab097ef5ea1dfb3 (diff)
downloadfetchmail-86c5e63d7cccacc5388b0e2fa4cbd22191e4ca3b.tar.gz
fetchmail-86c5e63d7cccacc5388b0e2fa4cbd22191e4ca3b.tar.bz2
fetchmail-86c5e63d7cccacc5388b0e2fa4cbd22191e4ca3b.zip
Skip XHTML validation if xmllint or DTD are missing.
Diffstat (limited to 't.validate-xhtml')
-rwxr-xr-xt.validate-xhtml9
1 files changed, 9 insertions, 0 deletions
diff --git a/t.validate-xhtml b/t.validate-xhtml
index d66fc98f..bf55f4fb 100755
--- a/t.validate-xhtml
+++ b/t.validate-xhtml
@@ -6,6 +6,15 @@ set -eu
e=0
fail=
IFS=$(printf '\n\t')
+
+# smoke test validator and skip if it fails
+cat - <<'_EOF' | xmllint 2>/dev/null --nonet --postvalid --noout - || exit 77
+<?xml version="1.0" encoding="US-ASCII"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title /></head><body></body></html>
+_EOF
+
for i in "${srcdir}"/*.html ; do
case "$i" in */fetchmail-man.html) continue ;; esac
xmllint --postvalid --noout "$i" || { e=1 ; fail="$i${fail:+" "}$fail" ; }