diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2012-04-01 15:33:49 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2012-04-01 15:34:54 +0200 |
commit | e4ef077fdad22286502ae485b7b8f7ca88fd49dd (patch) | |
tree | 3e93d04a81d3c568a86c05128e71b090cedde9c9 /t.validate-xhtml10 | |
parent | d18de31f1c80f553996a85c325456f8f4f0cf927 (diff) | |
download | fetchmail-e4ef077fdad22286502ae485b7b8f7ca88fd49dd.tar.gz fetchmail-e4ef077fdad22286502ae485b7b8f7ca88fd49dd.tar.bz2 fetchmail-e4ef077fdad22286502ae485b7b8f7ca88fd49dd.zip |
Validate XHTML 1.0 stuff even when skipping 1.1.
Diffstat (limited to 't.validate-xhtml10')
-rwxr-xr-x | t.validate-xhtml10 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t.validate-xhtml10 b/t.validate-xhtml10 new file mode 100755 index 00000000..a7cc9e6b --- /dev/null +++ b/t.validate-xhtml10 @@ -0,0 +1,28 @@ +#! /bin/sh + +# This test script validates all *.html files as XHTML. + +set -eu +e=0 +fail= +IFS=$(printf '\n\t') + +# smoke test validator for XHTML 1.0 Transitional, 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 ;; + */Mailbox-Names-UTF7.html) continue ;; + esac + xmllint --postvalid --noout "$i" || { e=1 ; fail="$i${fail:+" "}$fail" ; } +done +if [ $e != 0 ] ; then + echo >&2 ">>>>> Invalid XHTML in files: ${fail}." +fi +exit $e |