Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

test::xml::twig(3pm) [debian man page]

Test::XML::Twig(3pm)					User Contributed Perl Documentation				      Test::XML::Twig(3pm)

NAME
Test::XML::Twig - Test XML::Twig handlers SYNOPSIS
use Test::XML::Twig tests => 2; use My::Twig qw( handler ); test_twig_handler( &handler, '<foo/>', '<bar/>', 'turns foo to bar', ); test_twig_handlers( { twig_handlers => { 'foo' => &handler } }, '<foo/>', '<bar/>', 'turns foo into bar', ); DESCRIPTION
This module is for testing XML::Twig handlers. FUNCTIONS
All functions are exported. get_twig ( INPUT [, ARGS ] ) Return a parsed twig of INPUT, or undef on parse failure. Optionally, ARGS may be supplied as a set of hash-like parameters to be passed into the twig constructor. test_twig_handler ( HANDLER, INPUT, EXPECTED, TESTNAME [, COND ] ) Parse INPUT, using HANDLER as a twig_handler (i.e: it gets called after the parse tree has been built). Tests that the result is the same as EXPECTED (which can be either a string of XML or a quoted regex). HANDLER must be a code ref. Optionally, COND can be supplied. Instead of the handler being called with the root element of INPUT, COND will be used with first_child() to select an alternative element. Returns true / false depending upon test success. test_twig_handlers ( ARGS, INPUT, EXPECTED, TESTNAME ) This is similiar to test_twig_handler(), but with more flexibility. The first argument, ARGS, is a hash reference which can be used to specify any of the ordinary parameters to twig's constructor. This lets you test things like start_tag_handlers, as well as multiple twig_handlers together. SEE ALSO
Test::More, Test::XML, XML::Twig. AUTHOR
Dominic Mitchell, <cpan2 (at) semantico.com> COPYRIGHT AND LICENSE
Copyright 2002 by semantico This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2009-07-02 Test::XML::Twig(3pm)

Check Out this Related Man Page

Test::Valgrind::Parser::XML::Twig(3pm)			User Contributed Perl Documentation		    Test::Valgrind::Parser::XML::Twig(3pm)

NAME
Test::Valgrind::Parser::XML::Twig - Parse valgrind XML output with XML::Twig. VERSION
Version 1.13 DESCRIPTION
This subclass of XML::Twig and Test::Valgrind::Parser::XML encapsulates an XML::Twig parser inside the Test::Valgrind::Parser framework. It is able to parse the XML output from "valgrind" up to protocol version 4 and to generate the appropriate reports accordingly. METHODS
"protocol_version" The version of the protocol that the current stream is conforming to. It is reset before and after the parsing phase, so it's effectively only available from inside "parse". SEE ALSO
Test::Valgrind, Test::Valgrind::Parser, Test::Valgrind::Parser::XML. XML::Twig. AUTHOR
Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>. You can contact me by mail or on "irc.perl.org" (vincent). BUGS
Please report any bugs or feature requests to "bug-test-valgrind at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Test::Valgrind::Parser::XML::Twig COPYRIGHT &; LICENSE Copyright 2009,2010,2011 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-08-25 Test::Valgrind::Parser::XML::Twig(3pm)
Man Page