summaryrefslogtreecommitdiff
path: root/cpan/Test-Harness/t/parser-config.t
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-06-29 10:16:45 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-06-29 10:16:45 +0100
commit6d3136644eb73f7a0727d341c90937f4234835bf (patch)
tree5d33927fe3fa23eedb65329c17a9eaffa9af71c3 /cpan/Test-Harness/t/parser-config.t
parent8f4d46e2e6b66d00df1e347dab564fd9799c8d94 (diff)
downloadperl-6d3136644eb73f7a0727d341c90937f4234835bf.tar.gz
Update Test-Harness to CPAN version 3.21
Mark UPSTREAM as 'cpan' in Maintainers.pl [DELTA] 3.21 2010-01-30 - Add test to ensure we're not depending on a module we no longer ship. - Fix up skip counts for Windows case - tests were failing on Windows. 3.20 2010-01-22 - Remove references / dependency on TAP::Parser::Source::Perl 3.19 2010-01-20 - Avoid depending on Module::Build. The resulting circular dependency made it impossible to install Test::Harness and/or Module::Build in some cases. 3.18 2010-01-19 - Handle the case where the filename of the perl executable contains space. Thanks to kmx. - Various documentation fixes. 3.17_04 2010-01-04 - Fix failures due to unknown location of Perl in t/source_handler.t. - Use EUMM style shebang magic to produce an executable 'psql' for t/source_handler.t. 3.17_03 2009-11-19 - Fix failures due to over-strict assertions in t/source.t. 3.17_02 2009-11-17 - Merge in Steve's missing changes. Oops. 3.17_01 2009-11-17 - Re-engineered source handling API to allow users to configure how TAP is sourced by the parser. Introduced a new 'sources' param to TAP::Harness, and new options to prove, eg: prove --source XYZ --xyz-option foo=bar The new TAP::Parser::SourceHandler API makes it much easier to write plugins. This breaks backwards compatibility for plugins & extenstions that rely on the following APIs: TAP::Parser::Source TAP::Parser::SourceFactory TAP::Parser::IteratorFactory TAP::Parser, specifically: new: 'source' & 'tap' params source_class perl_source_class iterator_factory_class make_source make_perl_source make_iterator Please see the TAP::Parser docs for more details. [Steve Purkis & David Wheeler] - Removed dependency on File::Spec [Schwern] - Made it possible to pass different args to each test [Lee Johnson] - Added HARNESS_SUBCLASS option to Test::Harness - Added TAP::Parser::SourceHandler::File which lets you to stream TAP from a text file (eg: *.tap). - Added TAP::Parser::SourceHandler::pgTAP. All the source handlers are new, but this is the only one to add major new functioality: the ability to run pgTAP tests (http://pgtap.projects.postgresql.org/).
Diffstat (limited to 'cpan/Test-Harness/t/parser-config.t')
-rw-r--r--cpan/Test-Harness/t/parser-config.t23
1 files changed, 12 insertions, 11 deletions
diff --git a/cpan/Test-Harness/t/parser-config.t b/cpan/Test-Harness/t/parser-config.t
index bd3625902d..1e0b719947 100644
--- a/cpan/Test-Harness/t/parser-config.t
+++ b/cpan/Test-Harness/t/parser-config.t
@@ -1,29 +1,30 @@
#!/usr/bin/perl -w
BEGIN {
+ if ( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
+ }
+ else {
unshift @INC, 't/lib';
+ }
}
use strict;
use vars qw(%INIT %CUSTOM);
-use Test::More tests => 11;
+use Test::More tests => 5;
use File::Spec::Functions qw( catfile updir );
use TAP::Parser;
-use_ok('MySource');
-use_ok('MyPerlSource');
use_ok('MyGrammar');
-use_ok('MyIteratorFactory');
use_ok('MyResultFactory');
-my $source = catfile( 't', 'source_tests', 'source' );
+my @t_path = $ENV{PERL_CORE} ? ( updir(), 'ext', 'Test-Harness' ) : ();
+my $source = catfile( @t_path, 't', 'source_tests', 'source' );
my %customize = (
- source_class => 'MySource',
- perl_source_class => 'MyPerlSource',
- grammar_class => 'MyGrammar',
- iterator_factory_class => 'MyIteratorFactory',
- result_factory_class => 'MyResultFactory',
+ grammar_class => 'MyGrammar',
+ result_factory_class => 'MyResultFactory',
);
my $p = TAP::Parser->new(
{ source => $source,
@@ -32,7 +33,7 @@ my $p = TAP::Parser->new(
);
ok( $p, 'new customized parser' );
-foreach my $key ( keys %customize ) {
+for my $key ( keys %customize ) {
is( $p->$key(), $customize{$key}, "customized $key" );
}