No description, website, or topics provided.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config/perl
lib/Test/HTCT
t
t_deps/modules
.gitignore
.gitmodules
.travis.yml
Makefile
README.pod

README.pod

=head1 NAME Test::HTCT::Parser - A parser for test data in HTML Tree Construction Tests format =head1 SYNOPSIS use Test::HTCT::Parser; for_each_test $file_name, { data => {}, errors => {is_list => 1}, document => {is_prefixed => 1}, 'document-fragment' => {is_prefixed => 1}, }, sub { my $test = shift; my ($serialized, $errors) = parse_data ($test->{data}->[0]); is $serialized, $test->{document}->[0]; is_deeply $errors, $test->{errors}->[0]; }; =head1 DESCRIPTION The C module exports a function to parse test data file encoded in the format for HTML Parsers' Tree Construction Tests. It can also be used to parse test data for other purposes than HTML parsing. For more information on the usage of the module, see C test script. =head1 TEST CALLBACK The callback code is invoked for each test, in order in the input test data file. It is invoked with two arguments. The first argument C<$_[0]> represents the test data. The second argument C<$_[1]> has additional data. It is a hash reference with a key/value pair: C is the line number of the first line of the test data in the input test data file. =head1 SEE ALSO WHATWG Wiki, Parser tests, Tree Constructoion Tests . HTML Parser Tree Constructions Tests (from html5lib repository) . sami-test.js, which is a JavaScript implementation of the format . =head1 DISTRIBUTION The latest version of the module is available from the GitHub repository: . =head1 DEPENDENCY The module requires Perl 5.8 or later. =head1 AUTHOR Wakaba . The format was originally defined by WHATWG/html5lib contributors. =head1 HISTORY The parser was originally developed as part of L HTML parser module, which is part of the manakai package . The first version, C<1.0>, as a standalone module with new name L is released on February 19, 2011. The second version, C<2.0>, added support for C fields. =head1 LICENSE Copyright 2007-2017 Wakaba . This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut