.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Test::HTML::Tidy5 3pm" .TH Test::HTML::Tidy5 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Test::HTML::Tidy5 \- Test::More\-style wrapper around HTML::Tidy5 .SH VERSION .IX Header "VERSION" Version 1.06 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Test::HTML::Tidy5 tests => 4; \& \& my $table = build_display_table(); \& html_tidy_ok( $table, \*(AqBuilt display table properly\*(Aq ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module provides a few convenience methods for testing exception based code. It is built with Test::Builder and plays happily with Test::More and friends. .PP If you are not already familiar with Test::More now would be the time to go take a look. .SH EXPORT .IX Header "EXPORT" \&\f(CW\*(C`html_tidy_ok\*(C'\fR .ie n .SS "html_tidy_ok( [$tidy, ] $html, $name )" .el .SS "html_tidy_ok( [$tidy, ] \f(CW$html\fP, \f(CW$name\fP )" .IX Subsection "html_tidy_ok( [$tidy, ] $html, $name )" Checks to see if \f(CW$html\fR is a valid HTML document. .PP If you pass an HTML::Tidy5 object, \f(CWhtml_tidy_ok()\fR will use that for its settings. .PP .Vb 3 \& my $tidy = HTML::Tidy5\->new( {config_file => \*(Aqpath/to/config\*(Aq} ); \& $tidy\->ignore( type => TIDY_WARNING, type => TIDY_INFO ); \& html_tidy_ok( $tidy, $content, "Web page is OK, ignoring warnings and info\*(Aq ); .Ve .PP Otherwise, it will use the default rules. .PP .Vb 1 \& html_tidy_ok( $content, "Web page passes ALL tests" ); .Ve .ie n .SS "html_fragment_tidy_ok( [$tidy, ] $html, $name )" .el .SS "html_fragment_tidy_ok( [$tidy, ] \f(CW$html\fP, \f(CW$name\fP )" .IX Subsection "html_fragment_tidy_ok( [$tidy, ] $html, $name )" Works the same as \f(CW\*(C`html_tidy_ok\*(C'\fR, but first wraps it up an HTML document. This is useful for when want to validate self-contained snippets of HTML, such as from templates or an HTML feed from a third party, and check that it is valid. .SH BUGS .IX Header "BUGS" All bugs and requests are now being handled through GitHub. .PP .Vb 1 \& https://github.com/petdance/html\-lint/issues .Ve .PP DO NOT send bug reports to http://rt.cpan.org/. .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2005\-2018 Andy Lester. .PP This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License v2.0. .PP http://www.opensource.org/licenses/Artistic\-2.0 .PP Please note that these modules are not products of or supported by the employers of the various contributors to the code. .SH AUTHOR .IX Header "AUTHOR" Andy Lester, \f(CW\*(C`andy@petdance.com\*(C'\fR