r14771 - in /branches/upstream/libtest-harness-perl/current: ./ bin/ lib/App/ lib/App/Prove/ lib/TAP/ lib/TAP/Formatter/ lib/TAP/Formatter/Console/ lib/TAP/Parser/ lib/TAP/Parser/Iterator/ lib/TAP/Parser/Result/ lib/TAP/Parser/Source/ lib/TAP/Parser/YAMLish/ lib/Test/ t/ t/compat/
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Mon Feb 11 21:41:24 UTC 2008
Author: gregoa-guest
Date: Mon Feb 11 21:41:23 2008
New Revision: 14771
URL: http://svn.debian.org/wsvn/?sc=1&rev=14771
Log:
[svn-upgrade] Integrating new upstream version, libtest-harness-perl (3.09)
Added:
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Utils.pm
branches/upstream/libtest-harness-perl/current/t/utils.t
Modified:
branches/upstream/libtest-harness-perl/current/Changes
branches/upstream/libtest-harness-perl/current/HACKING.pod
branches/upstream/libtest-harness-perl/current/MANIFEST
branches/upstream/libtest-harness-perl/current/META.yml
branches/upstream/libtest-harness-perl/current/bin/prove
branches/upstream/libtest-harness-perl/current/lib/App/Prove.pm
branches/upstream/libtest-harness-perl/current/lib/App/Prove/State.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Base.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Color.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/ParallelSession.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/Session.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Harness.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Aggregator.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Grammar.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Array.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Process.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Stream.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Multiplexer.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Bailout.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Comment.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Plan.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Test.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Unknown.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Version.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/YAML.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source/Perl.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Reader.pm
branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Writer.pm
branches/upstream/libtest-harness-perl/current/lib/Test/Harness.pm
branches/upstream/libtest-harness-perl/current/t/000-load.t
branches/upstream/libtest-harness-perl/current/t/compat/env.t
Modified: branches/upstream/libtest-harness-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/Changes?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/Changes (original)
+++ branches/upstream/libtest-harness-perl/current/Changes Mon Feb 11 21:41:23 2008
@@ -1,4 +1,10 @@
Revision history for Test-Harness
+
+3.09 2008-02-10
+ - support for HARNESS_PERL_SWITCHES containing things like
+ '-e "system(shift)"'.
+ - set HARNESS_IS_VERBOSE during verbose testing.
+ - documentation fixes.
3.08 2008-02-08
- added support for 'out' option to
Modified: branches/upstream/libtest-harness-perl/current/HACKING.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/HACKING.pod?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/HACKING.pod (original)
+++ branches/upstream/libtest-harness-perl/current/HACKING.pod Mon Feb 11 21:41:23 2008
@@ -13,7 +13,8 @@
testers, documenters.)
If you are looking for more information on how to I<use> TAP::Harness,
-you probably want the L<TAP::Harness::Cookbook> instead.
+you probably want
+L<http://testanything.org/wiki/index.php/TAP::Parser_Cookbook> instead.
=head1 Getting Started
Modified: branches/upstream/libtest-harness-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/MANIFEST?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/MANIFEST (original)
+++ branches/upstream/libtest-harness-perl/current/MANIFEST Mon Feb 11 21:41:23 2008
@@ -41,6 +41,7 @@
lib/TAP/Parser/Result/YAML.pm
lib/TAP/Parser/Source.pm
lib/TAP/Parser/Source/Perl.pm
+lib/TAP/Parser/Utils.pm
lib/TAP/Parser/YAMLish/Reader.pm
lib/TAP/Parser/YAMLish/Writer.pm
lib/Test/Harness.pm
@@ -156,6 +157,7 @@
t/taint.t
t/testargs.t
t/unicode.t
+t/utils.t
t/yamlish-output.t
t/yamlish-writer.t
t/yamlish.t
Modified: branches/upstream/libtest-harness-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/META.yml?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/META.yml (original)
+++ branches/upstream/libtest-harness-perl/current/META.yml Mon Feb 11 21:41:23 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Test-Harness
-version: 3.08
+version: 3.09
abstract: ~
license: perl
author: ~
Modified: branches/upstream/libtest-harness-perl/current/bin/prove
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/bin/prove?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/bin/prove (original)
+++ branches/upstream/libtest-harness-perl/current/bin/prove Mon Feb 11 21:41:23 2008
@@ -240,6 +240,17 @@
$ prove -b --state=hot --state=all,save
+=head2 Taint Mode
+
+Normally when a Perl program is run in taint mode the contents of the
+C<PERL5LIB> environment variable do not appear in C<@INC>.
+
+Because C<PERL5LIB> is often used during testing to add build directories
+to C<@INC> prove (actually L<TAP::Parser::Source::Perl>) passes the
+names of any directories found in C<PERL5LIB> as -I switches. The net
+effect of this is that C<PERL5LIB> is honoured even when prove is run in
+taint mode.
+
=cut
# vim:ts=4:sw=4:et:sta
Modified: branches/upstream/libtest-harness-perl/current/lib/App/Prove.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/App/Prove.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/App/Prove.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/App/Prove.pm Mon Feb 11 21:41:23 2008
@@ -2,6 +2,7 @@
use strict;
use TAP::Harness;
+use TAP::Parser::Utils qw( split_shell );
use File::Spec;
use Getopt::Long;
use App::Prove::State;
@@ -15,11 +16,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
=head1 DESCRIPTION
@@ -462,9 +463,7 @@
push @switches, '-w';
}
- if ( defined( my $hps = $ENV{HARNESS_PERL_SWITCHES} ) ) {
- push @switches, $hps;
- }
+ push @switches, split_shell( $ENV{HARNESS_PERL_SWITCHES} );
return @switches ? \@switches : ();
}
Modified: branches/upstream/libtest-harness-perl/current/lib/App/Prove/State.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/App/Prove/State.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/App/Prove/State.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/App/Prove/State.pm Mon Feb 11 21:41:23 2008
@@ -20,11 +20,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Base.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Base.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Base.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Base.pm Mon Feb 11 21:41:23 2008
@@ -9,11 +9,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
my $GOT_TIME_HIRES;
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Color.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Color.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Color.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Color.pm Mon Feb 11 21:41:23 2008
@@ -70,11 +70,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console.pm Mon Feb 11 21:41:23 2008
@@ -52,11 +52,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/ParallelSession.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/ParallelSession.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/ParallelSession.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/ParallelSession.pm Mon Feb 11 21:41:23 2008
@@ -48,11 +48,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/Session.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/Session.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/Session.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Formatter/Console/Session.pm Mon Feb 11 21:41:23 2008
@@ -36,11 +36,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Harness.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Harness.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Harness.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Harness.pm Mon Feb 11 21:41:23 2008
@@ -22,11 +22,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
$ENV{HARNESS_ACTIVE} = 1;
$ENV{HARNESS_VERSION} = $VERSION;
@@ -484,7 +484,7 @@
When you supply a separate display name it becomes possible to run a
test more than once; the display name is effectively the alias by which
the test is known inside the harness. The harness doesn't care if it
-runs the same script more than once along as each invocation uses a
+runs the same script more than once when each invocation uses a
different name.
=cut
@@ -495,6 +495,10 @@
my $jobs = $self->jobs;
my @expanded = map { 'ARRAY' eq ref $_ ? $_ : [ $_, $_ ] } @tests;
+
+ # #12458
+ local $ENV{HARNESS_IS_VERBOSE} = 1
+ if $self->formatter->verbosity > 0;
# Formatter gets only names
$self->formatter->prepare( map { $_->[1] } @expanded );
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser.pm Mon Feb 11 21:41:23 2008
@@ -19,11 +19,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
my $DEFAULT_TAP_VERSION = 12;
my $MAX_TAP_VERSION = 13;
@@ -505,13 +505,6 @@
}
This is merely a synonym for C<as_string>.
-
-=head3 C<tests_planned>
-
- my $planned = $result->tests_planned;
-
-Returns the number of tests planned. For example, a plan of C<1..17> will
-cause this method to return '17'.
=head3 C<directive>
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Aggregator.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Aggregator.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Aggregator.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Aggregator.pm Mon Feb 11 21:41:23 2008
@@ -10,11 +10,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
=head1 SYNOPSIS
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Grammar.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Grammar.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Grammar.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Grammar.pm Mon Feb 11 21:41:23 2008
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator.pm Mon Feb 11 21:41:23 2008
@@ -13,11 +13,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 SYNOPSIS
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Array.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Array.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Array.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Array.pm Mon Feb 11 21:41:23 2008
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 SYNOPSIS
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Process.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Process.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Process.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Process.pm Mon Feb 11 21:41:23 2008
@@ -19,11 +19,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 SYNOPSIS
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Stream.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Stream.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Stream.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Iterator/Stream.pm Mon Feb 11 21:41:23 2008
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 SYNOPSIS
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Multiplexer.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Multiplexer.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Multiplexer.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Multiplexer.pm Mon Feb 11 21:41:23 2008
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 SYNOPSIS
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result.pm Mon Feb 11 21:41:23 2008
@@ -27,11 +27,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
=head2 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Bailout.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Bailout.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Bailout.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Bailout.pm Mon Feb 11 21:41:23 2008
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Comment.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Comment.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Comment.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Comment.pm Mon Feb 11 21:41:23 2008
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Plan.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Plan.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Plan.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Plan.pm Mon Feb 11 21:41:23 2008
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Test.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Test.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Test.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Test.pm Mon Feb 11 21:41:23 2008
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Unknown.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Unknown.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Unknown.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Unknown.pm Mon Feb 11 21:41:23 2008
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Version.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Version.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Version.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/Version.pm Mon Feb 11 21:41:23 2008
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/YAML.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/YAML.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/YAML.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Result/YAML.pm Mon Feb 11 21:41:23 2008
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source.pm Mon Feb 11 21:41:23 2008
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
=head1 DESCRIPTION
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source/Perl.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source/Perl.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source/Perl.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Source/Perl.pm Mon Feb 11 21:41:23 2008
@@ -16,11 +16,11 @@
=head1 VERSION
-Version 3.08
-
-=cut
-
-$VERSION = '3.08';
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
=head1 DESCRIPTION
@@ -262,11 +262,6 @@
$_ = qq["$_"] if ( ( /\s/ || IS_VMS ) && !/^".*"$/ );
}
- my %found_switch = map { $_ => 0 } @switches;
-
- # remove duplicate switches
- @switches
- = grep { defined $_ && $_ ne '' && !$found_switch{$_}++ } @switches;
return @switches;
}
Added: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Utils.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Utils.pm?rev=14771&op=file
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Utils.pm (added)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/Utils.pm Mon Feb 11 21:41:23 2008
@@ -1,0 +1,72 @@
+package TAP::Parser::Utils;
+
+use strict;
+use Exporter;
+use vars qw($VERSION @ISA @EXPORT_OK);
+
+ at ISA = qw( Exporter );
+ at EXPORT_OK = qw( split_shell );
+
+=head1 NAME
+
+TAP::Parser::Utils - Internal TAP::Parser utilities
+
+=head1 VERSION
+
+Version 3.09
+
+=cut
+
+$VERSION = '3.09';
+
+=head1 SYNOPSIS
+
+ use TAP::Parser::Utils qw( split_shell )
+ my @switches = split_shell( $arg );
+
+=head1 DESCRIPTION
+
+B<FOR INTERNAL USE ONLY!>
+
+=head2 INTERFACE
+
+=head3 C<split_shell>
+
+Shell style argument parsing. Handles backslash escaping, single and
+double quoted strings but not shell substitutions.
+
+Pass one or more strings containing shell escaped arguments. The return
+value is an array of arguments parsed from the input strings according
+to (approximate) shell parsing rules. It's legal to pass C<undef> in
+which case an empty array will be returned. That makes it possible to
+
+ my @args = split_shell( $ENV{SOME_ENV_VAR} );
+
+without worrying about whether the environment variable exists.
+
+This is used to split HARNESS_PERL_ARGS into individual switches.
+
+=cut
+
+sub split_shell {
+ my @parts = ();
+
+ for my $switch ( grep defined && length, @_ ) {
+ push @parts, $1 while $switch =~ /
+ (
+ (?: [^\\"'\s]+
+ | \\.
+ | " (?: \\. | [^"] )* "
+ | ' (?: \\. | [^'] )* '
+ )+
+ ) /xg;
+ }
+
+ for (@parts) {
+ s/ \\(.) | ['"] /defined $1 ? $1 : ''/exg;
+ }
+
+ return @parts;
+}
+
+1;
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Reader.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Reader.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Reader.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Reader.pm Mon Feb 11 21:41:23 2008
@@ -4,7 +4,7 @@
use vars qw{$VERSION};
-$VERSION = '3.08';
+$VERSION = '3.09';
# TODO:
# Handle blessed object syntax
@@ -277,7 +277,7 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=head1 SYNOPSIS
Modified: branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Writer.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Writer.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Writer.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/TAP/Parser/YAMLish/Writer.pm Mon Feb 11 21:41:23 2008
@@ -4,7 +4,7 @@
use vars qw{$VERSION};
-$VERSION = '3.08';
+$VERSION = '3.09';
my $ESCAPE_CHAR = qr{ [ \x00-\x1f \" ] }x;
my $ESCAPE_KEY = qr{ (?: ^\W ) | $ESCAPE_CHAR }x;
@@ -149,7 +149,7 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=head1 SYNOPSIS
Modified: branches/upstream/libtest-harness-perl/current/lib/Test/Harness.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/lib/Test/Harness.pm?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/lib/Test/Harness.pm (original)
+++ branches/upstream/libtest-harness-perl/current/lib/Test/Harness.pm Mon Feb 11 21:41:23 2008
@@ -10,6 +10,8 @@
use TAP::Harness ();
use TAP::Parser::Aggregator ();
use TAP::Parser::Source::Perl ();
+
+use TAP::Parser::Utils qw( split_shell );
use Config;
use Exporter;
@@ -41,11 +43,11 @@
=head1 VERSION
-Version 3.08
+Version 3.09
=cut
-$VERSION = '3.08';
+$VERSION = '3.09';
# Backwards compatibility for exportable variable names.
*verbose = *Verbose;
@@ -93,7 +95,8 @@
supported is not reproduced here. Straps is now available as a stand
alone module: L<Test::Harness::Straps>.
-See L<TAP::Parser> for the main documentation for this distribution.
+See L<TAP::Parser>, L<TAP::Harness> for the main documentation for this
+distribution.
=head1 FUNCTIONS
@@ -221,14 +224,10 @@
sub _new_harness {
my $sub_args = shift || {};
- if ( defined( my $env_sw = $ENV{HARNESS_PERL_SWITCHES} ) ) {
- $Switches .= ' ' . $env_sw if ( length($env_sw) );
- }
-
- # This is a bit crufty. The switches have all been joined into a
- # single string so we have to try and recover them.
my ( @lib, @switches );
- for my $opt ( split( /\s+(?=-)/, $Switches ) ) {
+ for my $opt (
+ split_shell( $Switches, $ENV{HARNESS_PERL_SWITCHES} ) )
+ {
if ( $opt =~ /^ -I (.*) $ /x ) {
push @lib, $1;
}
@@ -556,6 +555,17 @@
=back
+=head1 Taint Mode
+
+Normally when a Perl program is run in taint mode the contents of the
+C<PERL5LIB> environment variable do not appear in C<@INC>.
+
+Because C<PERL5LIB> is often used during testing to add build
+directories to C<@INC> C<Test::Harness> (actually
+L<TAP::Parser::Source::Perl>) passes the names of any directories found
+in C<PERL5LIB> as -I switches. The net effect of this is that
+C<PERL5LIB> is honoured even in taint mode.
+
=head1 SEE ALSO
L<TAP::Harness>
@@ -572,7 +582,8 @@
Andy Armstrong C<< <andy at hexten.net> >>
-L<Test::Harness> (on which this module is based) has this attribution:
+L<Test::Harness> 2.64 (maintained by Andy Lester and on which this
+module is based) has this attribution:
Either Tim Bunce or Andreas Koenig, we don't know. What we know for
sure is, that it was inspired by Larry Wall's F<TEST> script that came
Modified: branches/upstream/libtest-harness-perl/current/t/000-load.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/t/000-load.t?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/t/000-load.t (original)
+++ branches/upstream/libtest-harness-perl/current/t/000-load.t Mon Feb 11 21:41:23 2008
@@ -3,7 +3,7 @@
use strict;
use lib 't/lib';
-use Test::More tests => 58;
+use Test::More tests => 60;
BEGIN {
@@ -37,6 +37,7 @@
TAP::Parser::Source
TAP::Parser::YAMLish::Reader
TAP::Parser::YAMLish::Writer
+ TAP::Parser::Utils
Test::Harness
);
Modified: branches/upstream/libtest-harness-perl/current/t/compat/env.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/t/compat/env.t?rev=14771&op=diff
==============================================================================
--- branches/upstream/libtest-harness-perl/current/t/compat/env.t (original)
+++ branches/upstream/libtest-harness-perl/current/t/compat/env.t Mon Feb 11 21:41:23 2008
@@ -3,6 +3,7 @@
# Test that env vars are honoured.
use strict;
+use lib 't/lib';
use Test::More (
$^O eq 'VMS'
Added: branches/upstream/libtest-harness-perl/current/t/utils.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-harness-perl/current/t/utils.t?rev=14771&op=file
==============================================================================
--- branches/upstream/libtest-harness-perl/current/t/utils.t (added)
+++ branches/upstream/libtest-harness-perl/current/t/utils.t Mon Feb 11 21:41:23 2008
@@ -1,0 +1,65 @@
+#!/usr/bin/perl -w
+
+BEGIN {
+ chdir 't' and @INC = '../lib' if $ENV{PERL_CORE};
+}
+
+use strict;
+use lib 't/lib';
+
+use TAP::Parser::Utils qw( split_shell );
+use Test::More;
+
+my @schedule = (
+ { name => 'Bare words',
+ in => 'bare words are here',
+ out => [ 'bare', 'words', 'are', 'here' ],
+ },
+ { name => 'Single quotes',
+ in => "'bare' 'words' 'are' 'here'",
+ out => [ 'bare', 'words', 'are', 'here' ],
+ },
+ { name => 'Double quotes',
+ in => '"bare" "words" "are" "here"',
+ out => [ 'bare', 'words', 'are', 'here' ],
+ },
+ { name => 'Escapes',
+ in => '\ "ba\"re" \'wo\\\'rds\' \\\\"are" "here"',
+ out => [ ' ', 'ba"re', "wo'rds", '\\are', 'here' ],
+ },
+ { name => 'Flag',
+ in => '-e "system(shift)"',
+ out => [ '-e', 'system(shift)' ],
+ },
+ { name => 'Nada',
+ in => undef,
+ out => [],
+ },
+ { name => 'Nada II',
+ in => '',
+ out => [],
+ },
+ { name => 'Zero',
+ in => 0,
+ out => ['0'],
+ },
+ { name => 'Empty',
+ in => '""',
+ out => [''],
+ },
+ { name => 'Empty II',
+ in => "''",
+ out => [''],
+ },
+);
+
+plan tests => 1 * @schedule;
+
+for my $test (@schedule) {
+ my $name = $test->{name};
+ my @got = split_shell( $test->{in} );
+ unless ( is_deeply \@got, $test->{out}, "$name: parse OK" ) {
+ use Data::Dumper;
+ diag( Dumper( { want => $test->{out}, got => \@got } ) );
+ }
+}
More information about the Pkg-perl-cvs-commits
mailing list