Test::HTML::W3C(3pm) | User Contributed Perl Documentation | Test::HTML::W3C(3pm) |
Test::HTML::W3C - Perform W3C HTML validation testing
use Test::HTML::W3C tests => $test_count; # or use Test::HTML::W3C 'show_detail'; # or when using both use Test::HTML::W3C tests => $test_count, 'show_detail'; is_valid_markup($my_html_scalar); is_valid_file("/path/to/my/file.html"); is_valid("http://example.com"); # Get the underlying WebService:;Validator::W3C::HTML object my $validator = validator();
The purpose of this module is to provide a wrapper around the W3C that works with the Test::More testing framework.
Please keep in mind that the W3C validation pages and services are a shared resource. If you plan to do many many tests, please consider using your own installation of the validation programs, and then use your local install by modifying the local validtor:
my $v = validator(); $v->validator_uri($my_own_validator);
See the documentation for WebService:;Validator::W3C::HTML and the W3C's site at http://validator.w3.org/ for details
Parameters: None.
Returns: $validator
Parameters: As per Test::Builder
Parameters: $markup, a scalar containing the data to test, $name, an optional descriptive test name.
Returns: None.
Parameters: $path, a scalar, $name, an optional descriptive test name.
Returns: None.
Parameters: $url, a scalar, $name, an optional descriptive test name.
Returns: None.
use Test::HTML::W3C 'show_detail'; is_valid_markup("<html></html">, "My simple test") or diag_html();
Parameters: $url, a scalar.
Returns: None.
Test::Builder::Module for creating your own testing modules.
Test::More for another popular testing framework, also based on Test::Builder
Test::Harness for detils about how test results are interpreted.
Victor <victor73@gmail.com> with inspiration from the authors of the Test::More and WebService::Validator::W3C:HTML modules.
See http://rt.cpan.org to report and view bugs.
Copyright 2006 by Victor <victor73@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
2021-01-07 | perl v5.32.0 |