Test::HTML::Tidy5(3pm)

Test::HTML::Tidy53pm

Test::more-style wrapper around html::tidy5

Usage

    use Test::HTML::Tidy5 tests => 4;
    my $table = build_display_table();
    html_tidy_ok( $table, 'Built display table properly' );

Version

Version 1.06

Overview

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.

If you are not already familiar with Test::More now would be the time to go take a look.

Export

"html_tidy_ok"

html_tidy_ok( [$tidy, ] $html, $name )

Checks to see if $html is a valid HTML document.

If you pass an HTML::Tidy5 object, html_tidy_ok() will use that for its settings.

    my $tidy = HTML::Tidy5->new( {config_file => 'path/to/config'} );
    $tidy->ignore( type => TIDY_WARNING, type => TIDY_INFO );
    html_tidy_ok( $tidy, $content, "Web page is OK, ignoring warnings and info' );

Otherwise, it will use the default rules.

    html_tidy_ok( $content, "Web page passes ALL tests" );

html_fragment_tidy_ok( [$tidy, ] $html, $name )

Works the same as "html_tidy_ok", 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.

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

Bugs

All bugs and requests are now being handled through GitHub.

    https://github.com/petdance/html-lint/issues

DO NOT send bug reports to http://rt.cpan.org/.

Author

Andy Lester, "[email protected]"

From libhtml-tidy5-perl 1.06-3+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.