Edit D:\app\Administrator\product\11.2.0\dbhome_1\perl\html\lib\Test\Harness\Straps.html
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test::Harness::Straps - detailed analysis of test results</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:" /> </head> <body style="background-color: white"> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> Test::Harness::Straps - detailed analysis of test results</span></strong></big> </td></tr> </table> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#construction">CONSTRUCTION</a></li> <ul> <li><a href="#new__"><code>new()</code></a></li> </ul> <li><a href="#analysis">ANALYSIS</a></li> <ul> <li><a href="#_strap__analyze___name____output_lines__">$strap->analyze( $name, \@output_lines )</a></li> <li><a href="#_strap__analyze_file___test_file__">$strap->analyze_file( $test_file )</a></li> </ul> <li><a href="#parsing">Parsing</a></li> <li><a href="#examples">EXAMPLES</a></li> <li><a href="#author">AUTHOR</a></li> <li><a href="#see_also">SEE ALSO</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <h1><a name="name">NAME</a></h1> <p>Test::Harness::Straps - detailed analysis of test results</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> use Test::Harness::Straps;</pre> <pre> my $strap = Test::Harness::Straps->new;</pre> <pre> # Various ways to interpret a test my $results = $strap->analyze($name, \@test_output); my $results = $strap->analyze_fh($name, $test_filehandle); my $results = $strap->analyze_file($test_file);</pre> <pre> # UNIMPLEMENTED my %total = $strap->total_results;</pre> <pre> # Altering the behavior of the strap UNIMPLEMENTED my $verbose_output = $strap->dump_verbose(); $strap->dump_verbose_fh($output_filehandle);</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p><strong>THIS IS ALPHA SOFTWARE</strong> in that the interface is subject to change in incompatible ways. It is otherwise stable.</p> <p>Test::Harness is limited to printing out its results. This makes analysis of the test results difficult for anything but a human. To make it easier for programs to work with test results, we provide Test::Harness::Straps. Instead of printing the results, straps provide them as raw data. You can also configure how the tests are to be run.</p> <p>The interface is currently incomplete. <em>Please</em> contact the author if you'd like a feature added or something change or just have comments.</p> <p> </p> <hr /> <h1><a name="construction">CONSTRUCTION</a></h1> <p> </p> <h2><a name="new__"><code>new()</code></a></h2> <pre> my $strap = Test::Harness::Straps->new;</pre> <p>Initialize a new strap.</p> <pre> $strap->_init;</pre> <p>Initialize the internal state of a strap to make it ready for parsing.</p> <p> </p> <hr /> <h1><a name="analysis">ANALYSIS</a></h1> <p> </p> <h2><a name="_strap__analyze___name____output_lines__">$strap->analyze( $name, \@output_lines )</a></h2> <pre> my $results = $strap->analyze($name, \@test_output);</pre> <p>Analyzes the output of a single test, assigning it the given <code>$name</code> for use in the total report. Returns the <code>$results</code> of the test. See <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/lib/Test/Harness/Results.html">the Results manpage</a>.</p> <p><code>@test_output</code> should be the raw output from the test, including newlines.</p> <pre> my $results = $strap->analyze_fh($name, $test_filehandle);</pre> <p>Like <code>analyze</code>, but it reads from the given filehandle.</p> <p> </p> <h2><a name="_strap__analyze_file___test_file__">$strap->analyze_file( $test_file )</a></h2> <pre> my $results = $strap->analyze_file($test_file);</pre> <p>Like <code>analyze</code>, but it runs the given <code>$test_file</code> and parses its results. It will also use that name for the total report.</p> <p>Returns the full command line that will be run to test <em>$file</em>.</p> <p>Returns the command that runs the test. Combine this with <code>_switches()</code> to build a command line.</p> <p>Typically this is <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlvar.html#__x"><code>$^X</code></a>, but you can set <code>$ENV{HARNESS_PERL}</code> to use a different Perl than what you're running the harness under. This might be to run a threaded Perl, for example.</p> <p>You can also overload this method if you've built your own strap subclass, such as a PHP interpreter for a PHP-based strap.</p> <p>Formats and returns the switches necessary to run the test.</p> <p>Returns only defined, non-blank, trimmed switches from the parms passed.</p> <pre> local $ENV{PERL5LIB} = $self->_INC2PERL5LIB;</pre> <p>Takes the current value of <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlvar.html#_inc"><code>@INC</code></a> and turns it into something suitable for putting onto <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlrun.html#perl5lib"><code>PERL5LIB</code></a>.</p> <pre> my @filtered_inc = $self->_filtered_INC;</pre> <p>Shortens <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlvar.html#_inc"><code>@INC</code></a> by removing redundant and unnecessary entries. Necessary for OSes with limited command line lengths, like VMS.</p> <pre> $self->_restore_PERL5LIB;</pre> <p>This restores the original value of the <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlrun.html#perl5lib"><code>PERL5LIB</code></a> environment variable. Necessary on VMS, otherwise a no-op.</p> <p> </p> <hr /> <h1><a name="parsing">Parsing</a></h1> <p>Methods for identifying what sort of line you're looking at.</p> <pre> my $is_diagnostic = $strap->_is_diagnostic($line, \$comment);</pre> <p>Checks if the given line is a comment. If so, it will place it into <code>$comment</code> (sans #).</p> <pre> my $is_header = $strap->_is_header($line);</pre> <p>Checks if the given line is a header (1..M) line. If so, it places how many tests there will be in <code>$strap->{max}</code>, a list of which tests are todo in <code>$strap->{todo}</code> and if the whole test was skipped <code>$strap->{skip_all}</code> contains the reason.</p> <pre> my $is_bail_out = $strap->_is_bail_out($line, \$reason);</pre> <p>Checks if the line is a "Bail out!". Places the reason for bailing (if any) in $reason.</p> <pre> $strap->_reset_file_state;</pre> <p>Resets things like <code>$strap->{max}</code> , <code>$strap->{skip_all}</code>, etc. so it's ready to parse the next file.</p> <p> </p> <hr /> <h1><a name="examples">EXAMPLES</a></h1> <p>See <em class="file">examples/mini_harness.plx</em> for an example of use.</p> <p> </p> <hr /> <h1><a name="author">AUTHOR</a></h1> <p>Michael G Schwern <code><schwern at pobox.com></code>, currently maintained by Andy Lester <code><andy at petdance.com></code>.</p> <p> </p> <hr /> <h1><a name="see_also">SEE ALSO</a></h1> <p><a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/lib/Test/Harness.html">the Test::Harness manpage</a></p> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> Test::Harness::Straps - detailed analysis of test results</span></strong></big> </td></tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de