diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-11-09 00:07:23 +0100 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-11-09 00:07:23 +0100 |
commit | c4cfefe2fb96d688914038ef48e36bc379ec87b5 (patch) | |
tree | 9c0594eddf165010b5a1e6d00df467f0dceb5d7b | |
parent | de5f30df51d15f62717ababcdde98689b2203730 (diff) | |
download | fetchmail-c4cfefe2fb96d688914038ef48e36bc379ec87b5.tar.gz fetchmail-c4cfefe2fb96d688914038ef48e36bc379ec87b5.tar.bz2 fetchmail-c4cfefe2fb96d688914038ef48e36bc379ec87b5.zip |
Smoke test XHTML 1.1 validation and skip test if failed.
-rwxr-xr-x | t.validate-xhtml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/t.validate-xhtml b/t.validate-xhtml index a64399a1..79649481 100755 --- a/t.validate-xhtml +++ b/t.validate-xhtml @@ -7,18 +7,25 @@ e=0 fail= IFS=$(printf '\n\t') -# smoke test validator and skip if it fails +# 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 +# ditto for XHTML 1.1 (asciidoc generates that) +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.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><title /></head><body><p></p></body></html> +_EOF for i in "${srcdir}"/*.html ; do case "$i" in */fetchmail-man.html) continue ;; - */Mailbox-Names-UTF7.html) continue ;; +# */Mailbox-Names-UTF7.html) continue ;; esac xmllint --postvalid --noout "$i" || { e=1 ; fail="$i${fail:+" "}$fail" ; } done |