Test::XML::SAX(3pm) | User Contributed Perl Documentation | Test::XML::SAX(3pm) |
Test::XML::SAX - Test XML::SAX handlers
use Test::XML::SAX tests => 1; use My::XML::Filter; my $handler = My::XML::Filter->new; test_sax( $handler, '<foo />', '<bar/>', 'translates foo to bar' ); # ... In Another File ... use Test::XML::SAX; use My::XML::Filter; sub do_tests { my $handler = My::XML::Filter->new; test_sax( $handler, '<foo />', '<bar/>', 'translates foo to bar' ); } test_all_sax_parsers( \&do_tests, 1 );
This module is for testing XML::SAX handlers.
All functions are exported.
NB: You must not issue a plan to Test::More if you call this function! The plan will be set for you, according to the number of parsers installed and NUMTESTS. This also means that you must not have any tests outside of SUB or you will get an error.
When SUB is called, it will be passed two arguments. The name of the parser being used and the number of tests. It can use this information to decide whether or not to skip this set of tests.
Test::More, Test::XML, XML::SAX.
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.
2022-06-18 | perl v5.34.0 |