Why not adopt me?
NAME
TAP::Convert::TET - Convert TAP to TET
VERSION
This document describes TAP::Convert::TET version 0.2.1
SYNOPSIS
use TAP::Convert::TET;
use TAP::Parser;
# Output to STDOUT by default
my $converter = TAP::Convert::TET->new;
$converter->start;
my $parser = TAP::Parser->new( { source => $fh } );
$converter->convert( $parser, 'test' );
$converter->end;
DESCRIPTION
Simpleminded converter that turns TAP into a TET journal. See http://tetworks.opengroup.org/ for more information about TET.
TET is used by the Linux Standard Base project. This module and the associated tap2tet program are intended to help integrate Perl's tests with LSB as part of an effort to incorporate Perl into LSB 3.2. See:
http://www.nntp.perl.org/group/perl.perl5.porters/2007/05/msg124480.html
for more information.
INTERFACE
new( $options )
-
Create a new
TAP::Convert::TET
. Options may be passed as a hash:my @buffer = ( ); # Capture output in an array my $converter = TAP::Convert::TET->new( { output => \@buffer } );
Available options are:
output
-
A filehandle, array reference or scalar reference to output the generated TET journal to. If a filehandle (or object that has a print method) is passed TET will be output to it. If a reference to an array is provided lines of TET will be appended to the array. If a scalar reference is provided the generated TET will be appended to the string.
Defaults to STDOUT.
tcc_version
-
The version of
tcc
to pretend to be. Defaults to '3.7a'. time_format
-
The format string to use for timestamps. Defaults to '%H:%M:%S'.
datetime_format
-
The format string to use for date and time fields. Defaults to '%H:%M:%S %Y%m%d'.
program
-
The name of the program generating the TET output. Defaults to 'TAP::Convert::TET'.
start
-
Output the TET preamble. Call this before any calls to
convert
. end
-
Output the TET postamble. Call this after any calls to
convert
. convert( $parser, $name )
-
Read test results from a
TAP::Parser
instance and output them in TET format. The optional$name
parameter may be used to provide the name of the test script that was the original source of the results.Convert may be called more than once to merge multiple TAP transcripts into a single TET journal.
write( $string )
-
Write a line to the TET output stream. Internal use.
tet( $code, $data, $text )
-
Write a formatted TET journal entry to the output stream.
Accessors
datetime_format
-
Get or set the format used for date/time strings.
time_format
-
Get or set the time format.
tcc_version
-
Get or set the version of
tcc
we pretend to be. program
-
Get or set the program we pretend to be.
sequence
-
Get or set the test sequence number.
writer
-
Get or set the closure that is called to handle output.
CONFIGURATION AND ENVIRONMENT
TAP::Convert::TET requires no configuration files or environment variables.
DEPENDENCIES
TAP::Parser 0.51
INCOMPATIBILITIES
None reported.
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to bug-tap-convert-tet@rt.cpan.org
, or through the web interface at http://rt.cpan.org.
REFERENCES
- The TETware User Guide, Appendix C, TETware journal lines
- tjreport
-
http://ftp.freestandards.org/pub/lsb/test_suites/released-3.0.0/source/runtime/tjreport-1.4.tar.gz
AUTHOR
Andy Armstrong <andy@hexten.net>
LICENCE AND COPYRIGHT
Copyright (c) 2007, Andy Armstrong <andy@hexten.net>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.