Test::...::Tidy5(3pm)
π NAME π
Test::HTML::Tidy5 β it's a Test::More-style wrapper around HTML::Tidy5, bestie. Like, it wraps the tidy and lets you test with it. Iconic behavior honestly.
β¨ VERSION β¨
Version 1.06 π (yes, the number matters, don't @ me)
π¦ SYNOPSIS π¦
use Test::HTML::Tidy5 tests => 4;
my $table = build_display_table();
html_tidy_ok( $table, 'Built display table properly' );
Look at her go. Four tests, one cute little call, zero chaos. π
πΈ DESCRIPTION πΈ
Okay so, this module hands you a few convenience methods for testing exception based code. It's built with Test::Builder, and it plays so happily with Test::More and friends β like the friend group is thriving, no drama. π«Ά
And if you're not already familiar with Test::More? bestie, now would be the time to go take a look. Not me nagging, just saying. π
π EXPORT π
"html_tidy_ok" β that's what you get. π
π§ html_tidy_ok( [$tidy, ] $html, $name )
Checks to see if $html is a valid HTML document. Vibe check, but for markup. β¨
If you pass an HTML::Tidy5 object, html_tidy_ok() will use that for its settings. Your tidy, your rules.
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" );
Not me leaving that trailing ' in the example exactly as it was. Copy it character for character, bestie, we don't fix the original, we respect the original. π
π html_fragment_tidy_ok( [$tidy, ] $html, $name )
Works the same as "html_tidy_ok", but first wraps it up an HTML document. Wraps it up, like a little gift. π
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. Tiny fragment, full main character energy. π₯
π 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/. I'm so serious. Do not. The old repo does not want your bug reports, she's retired, let her rest. π
π 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. Just so we're clear. β
π AUTHOR π
Andy Lester, "andy@petdance.com" β go say hi, respectfully. π«Ά
okay that's the whole page, and yes it's Perl documentation, section 3pm, perl v5.42.3, dated 2026-08-19. Slay. Go write some tests, bestie, you got this. π
β¨
π¦ where this page comes from
- ubuntu stonking: libhtml-tidy5-perl 1.06-3build3 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms