]> Pileus Git - ~andy/fetchmail/commitdiff
Validate *.html documents as XHTML in 'make check'.
authorMatthias Andree <matthias.andree@gmx.de>
Tue, 18 Aug 2009 12:14:37 +0000 (12:14 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Tue, 18 Aug 2009 12:14:37 +0000 (12:14 -0000)
svn path=/branches/BRANCH_6-3/; revision=5420

Makefile.am
t.validate-xhtml [new file with mode: 0755]

index 49937ff53349af91a9e6e2cf9bc2a54b6896139e..540853873e01e0a5933f56629d9019a13e6b0de5 100644 (file)
@@ -46,8 +46,8 @@ DEPENDENCIES=         libfm.a $(LIBOBJS)
 
 check_PROGRAMS=
 
-TESTS=                 t.smoke
-TESTS_ENVIRONMENT=     srcdir="@srcdir@" LC_ALL=C TZ=UTC
+TESTS=                 t.smoke t.validate-xhtml
+TESTS_ENVIRONMENT=     srcdir="$(srcdir)" LC_ALL=C TZ=UTC SHELL="$(SHELL)"
 
 if NEED_TRIO
 noinst_LIBRARIES+=     libtrio.a
@@ -175,7 +175,7 @@ EXTRA_DIST+=        $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn \
                m4/xsize.m4 \
                m4-local/ac-archive-license.txt \
                m4-local/ac_ma_search_package.m4 \
-               t.smoke t.rc \
+               $(TESTS) t.rc \
                dist-tools/html2txt \
                dist-tools/manServer.pl \
                Doxyfile
diff --git a/t.validate-xhtml b/t.validate-xhtml
new file mode 100755 (executable)
index 0000000..e327198
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+# This test script validates all *.html files as XHTML.
+
+set -e
+e=0
+fail=
+IFS=$(printf '\n\t')
+for i in "${srcdir}"/*.html ; do
+    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