Query: test::xml::sax
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Test::XML::SAX(3pm) User Contributed Perl Documentation Test::XML::SAX(3pm)NAMETest::XML::SAX - Test XML::SAX handlersSYNOPSISuse 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 );DESCRIPTIONThis module is for testing XML::SAX handlers.FUNCTIONSAll functions are exported. test_sax ( HANDLER, INPUT, EXPECTED [, TESTNAME ] ) This function will process INPUT using HANDLER, and compare the result with EXPECTED. TESTNAME can optionally be used to name the test in the output (a good idea). test_all_sax_parsers ( SUB [, NUMTESTS ] ) This function will repeat a set of tests for all installed SAX parsers. SUB must be a coderef to run a series of tests. NUMTESTS is the number of tests inside SUB. 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.SEE ALSOTest::More, Test::XML, XML::SAX.AUTHORDominic Mitchell, <cpan2 (at) semantico.com>COPYRIGHT AND LICENSECopyright 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::SAX(3pm)
Related Man Pages |
---|
xml::sax::exception(3) - osx |
xml::sax::exception(3) - centos |
test::xml::sax(3pm) - debian |
test::xml::twig(3pm) - debian |
xml::sax(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
XML parsers for UNIX |
The Linux Test Project: FEBRUARY 2009 Release Announcement |
Append Header from File 1 to File 2 |
How to improve the performance of parsers in Perl? |
Help me with perl script. |