Test::HTML::T5 - Test::More-style wrapper around HTML::T5
Version 0.013
use Test::HTML::T5 tests => 4; my $table = build_display_table(); html_tidy_ok( $table, 'Built display table properly' );
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.
html_tidy_ok
Checks to see if $html is a valid HTML document.
$html
If you pass an HTML::T5 object, html_tidy_ok() will use that for its settings.
html_tidy_ok()
my $tidy = HTML::T5->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" );
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.
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/.
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.
Andy Lester, andy@petdance.com
andy@petdance.com
To install HTML::T5, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::T5
CPAN shell
perl -MCPAN -e shell install HTML::T5
For more information on module installation, please visit the detailed CPAN module installation guide.