You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2019. It is now read-only.
I expect the same error to be reported for all three calls to html_ok, because I consider it to be a structure error, and all three calls ask for structure errors to be reported.
Instead I see it reported only when no HTML::Lint object is passed to html_ok().
#!/usr/bin/perl -w
use Test::More tests => 7;
use_ok('Test::HTML::Lint');
use_ok('HTML::Lint::Error');
# some html I consider structurally defective
$html = '</body><tr><body>';
# ***Fails as expected.
html_ok($html, 'Check without an explicit HTML::Lint object');
# make an HTML::Lint that looks only for structure errors
$lint = new HTML::Lint( only_types => HTML::Lint::Error::STRUCTURE );
isa_ok($lint, HTML::Lint);
# ***Unexpectedly passes.
html_ok($lint, $html, 'Check with HTML::Lint object that looks only for structure errors');
# make an HTML::Lint that looks for all types of errors
$lint = new HTML::Lint( only_types => [HTML::Lint::Error::STRUCTURE, HTML::Lint::Error::FLUFF, HTML::Lint::Error::HELPER] );
isa_ok($lint, HTML::Lint);
# ***Unexpectedly passes.
html_ok($lint, $html, 'Check with HTML::Lint object that looks only for all errors');
The text was updated successfully, but these errors were encountered:
Reported by [email protected], Oct 4, 2011
I expect the same error to be reported for all three calls to html_ok, because I consider it to be a structure error, and all three calls ask for structure errors to be reported.
Instead I see it reported only when no HTML::Lint object is passed to html_ok().
The text was updated successfully, but these errors were encountered: