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.
Copyright & license
Copyright 2005-2018 Andy Lester.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License v2.0.
http://www.opensource.org/licenses/Artistic-2.0
Please note that these modules are not products of or supported by the employers of the various contributors to the code.
Releases
3 releases since Debian 11 (Bullseye); the text changed 2 times.