aboutsummaryrefslogtreecommitdiffstats
path: root/t.validate-xhtml
blob: d66fc98f279b4a84ad59ea7a23bb5a9d603010af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/sh

# This test script validates all *.html files as XHTML.

set -eu
e=0
fail=
IFS=$(printf '\n\t')
for i in "${srcdir}"/*.html ; do
    case "$i" in */fetchmail-man.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