| Test::XML::Twig - Test XML::Twig handlers |
Test::XML::Twig - Test XML::Twig handlers
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',
);
This module is for testing XML::Twig handlers.
All functions are exported.
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.
the Test::More manpage, the Test::XML manpage, the XML::Twig manpage.
Dominic Mitchell, <cpan2 (at) semantico.com>
Copyright 2002 by semantico
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Test::XML::Twig - Test XML::Twig handlers |