perl-Test-HTML-Content - Perl extension for testing HTML output

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package name perl-Test-HTML-Content
Package version 0.09
Package release alt2
Package architecture noarch
Package type rpm
Installed size 29.78 KB
Download size 29.78 KB
Official Mirror
This is a module to test the HTML output of your programs in simple
test scripts. It can test a scalar (presumably containing HTML) for
the presence (or absence, or a specific number) of tags having (or
lacking) specific attributes. Unspecified attributes are ignored,
and the attribute values can be specified as either scalars (meaning
a match succeeds if the strings are identical) or regular expressions
(meaning that a match succeeds if the actual attribute value is matched
by the given RE) or undef (meaning that the attribute must not
be present).
If you want to specify or test the deeper structure
of the HTML (for example, META tags within the BODY) or the (textual)
content of tags, you will have to resort to `xpath_ok',`xpath_count'
and `no_xpath', which take an XPath expression. If you find yourself crafting
very complex XPath expression to verify the structure of your output, it is
time to rethink your testing process and maybe use a template based solution
or simply compare against prefabricated files as a whole.
The used HTML parser is HTML::TokeParser, the used XPath module
is XML::XPath or XML::LibXML. XML::XPath needs valid xHTML, XML::LibXML
will try its best to force your code into xHTML, but it is best to
supply valid xHTML (snippets) to the test functions.
If no XPath parsers/interpreters are available, the tests will automatically
skip, so your users won't need to install XML::XPath or XML::LibXML. The module
then falls back onto a crude implementation of the core functions for tags,
links, comments and text, and the diagnostic output of the tests varies a bit.
The test functionality is derived from the Test::Builder manpage, and the export
behaviour is the same. When you use Test::HTML::Content, a set of
HTML testing functions is exported into the namespace of the caller.


Package Version Architecture Repository
perl-Test-HTML-Content - - -


Name Value
/usr/share/perl5 -
perl(File/ -
perl(HTML/ -
perl(Test/ -
perl(XML/ -
perl(XML/ -
rpmlib(PayloadIsLzma) -


Name Value
perl(Test/HTML/ = 0.090
perl(Test/HTML/Content/ = 0.090
perl(Test/HTML/Content/ = 0.090
perl-Test-HTML-Content = 0.09-alt2


Type URL
Binary Package perl-Test-HTML-Content-0.09-alt2.noarch.rpm
Source Package perl-Test-HTML-Content-0.09-alt2.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    rpm [Sisyphus] noarch autoimports
    rpm [Sisyphus] noarch autoimports
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-Test-HTML-Content rpm package:
    # sudo apt-get install perl-Test-HTML-Content



See Also

Package Description
perl-Test-HTML-Differences-0.05-alt1.noarch.rpm Compare two html structures and show differences if it is not same
perl-Test-HTML-Form-1-alt1.noarch.rpm perl module Test-HTML-Form
perl-Test-HTML-Recursive-DeprecatedTags-0.0.1-alt1.noarch.rpm check HTML files for deprecated tags
perl-Test-HTML-Spelling-0.5.0-alt1.noarch.rpm Test the spelling of HTML documents
perl-Test-HTML-Tidy-1.00-alt2_13.noarch.rpm Test::More-style wrapper around HTML::Tidy
perl-Test-HTML-Tidy-Recursive-0.4.0-alt1.noarch.rpm recursively check files in a directory using HTML::Tidy
perl-Test-HTML-W3C-0.04-alt1.noarch.rpm Perform W3C HTML validation testing
perl-Test-HTTP-AnyEvent-Server-0.013-alt1.noarch.rpm the async counterpart to Test::HTTP::Server
perl-Test-HTTP-LocalServer-0.64-alt1.noarch.rpm spawn a local HTTP server for testing
perl-Test-HTTP-MockServer-0.0.1-alt1.noarch.rpm Implement a mock HTTP server for use in tests
perl-Test-HTTP-Response-0.06-alt2.noarch.rpm Perl testing module for HTTP responses
perl-Test-HTTP-Server-0.04-alt1.noarch.rpm simple forking http server
perl-Test-HTTPStatus-1.08-alt1.noarch.rpm check an HTTP status
perl-Test-Harness-KS-0.004-alt1.noarch.rpm Harness the power of clover and junit in one easy to use wrapper
perl-Test-Harness-KS-scripts-0.004-alt1.noarch.rpm Test-Harness-KS scripts