ext/Compress-Raw-Bzip2/t/01bzip2.t
ext/Compress-Raw-Bzip2/t/09limitoutput.t
ext/Compress-Raw-Bzip2/t/99pod.t
+ext/Compress-Raw-Bzip2/t/compress/CompTestUtils.pm
ext/Compress-Raw-Bzip2/typemap
ext/Compress-Raw-Zlib/Changes Compress::Raw::Zlib
ext/Compress-Raw-Zlib/config.in Compress::Raw::Zlib
ext/Compress-Raw-Zlib/t/07bufsize.t Compress::Raw::Zlib
ext/Compress-Raw-Zlib/t/09limitoutput.t Compress::Raw::Zlib
ext/Compress-Raw-Zlib/t/18lvalue.t Compress::Raw::Zlib
+ext/Compress-Raw-Zlib/t/compress/CompTestUtils.pm
ext/Compress-Raw-Zlib/typemap Compress::Raw::Zlib
ext/Compress-Raw-Zlib/zlib-src/adler32.c Compress::Raw::Zlib
ext/Compress-Raw-Zlib/zlib-src/compress.c Compress::Raw::Zlib
ext/DB_File/version.c Berkeley DB extension interface version check
ext/Devel-DProf/Changes Perl code profiler changelog
ext/Devel-DProf/DProf.pm Perl code profiler
+ext/Devel-DProf/dprof/test1_t Perl code profiler tests
+ext/Devel-DProf/dprof/test1_v Perl code profiler tests
+ext/Devel-DProf/dprof/test2_t Perl code profiler tests
+ext/Devel-DProf/dprof/test2_v Perl code profiler tests
+ext/Devel-DProf/dprof/test3_t Perl code profiler tests
+ext/Devel-DProf/dprof/test3_v Perl code profiler tests
+ext/Devel-DProf/dprof/test4_t Perl code profiler tests
+ext/Devel-DProf/dprof/test4_v Perl code profiler tests
+ext/Devel-DProf/dprof/test5_t Perl code profiler tests
+ext/Devel-DProf/dprof/test5_v Perl code profiler tests
+ext/Devel-DProf/dprof/test6_t Perl code profiler tests
+ext/Devel-DProf/dprof/test6_v Perl code profiler tests
+ext/Devel-DProf/dprof/test7_t Perl code profiler tests
+ext/Devel-DProf/dprof/test7_v Perl code profiler tests
+ext/Devel-DProf/dprof/test8_t Perl code profiler tests
+ext/Devel-DProf/dprof/test8_v Perl code profiler tests
+ext/Devel-DProf/dprof/V.pm Perl code profiler tests
ext/Devel-DProf/DProf.xs Perl code profiler
ext/Devel-DProf/Makefile.PL Perl code profiler makefile writer
ext/Devel-DProf/t/DProf.t Perl code profiler
ext/Encode/t/mime-name.t test script
ext/Encode/t/Mod_EUCJP.pm module that t/enc_module.enc uses
ext/Encode/t/perlio.t test script
-ext/Encode/t/piconv.t test script
ext/Encode/t/rt.pl test script
ext/Encode/t/unibench.pl benchmark script
ext/Encode/t/Unicode.t test script
ext/File-Glob/t/taint.t See if File::Glob works
ext/Filter-Util-Call/Call.pm Filter::Util::Call extension module
ext/Filter-Util-Call/Call.xs Filter::Util::Call extension external subroutines
+ext/Filter-Util-Call/filter-util.pl See if Filter::Util::Call works
ext/Filter-Util-Call/t/call.t See if Filter::Util::Call works
ext/GDBM_File/GDBM_File.pm GDBM extension Perl module
ext/GDBM_File/GDBM_File.xs GDBM extension external subroutines
ext/IO-Compress/t/110encode-rawdeflate.t IO::Compress
ext/IO-Compress/t/110encode-zip.t IO::Compress
ext/IO-Compress/t/999pod.t IO::Compress
+ext/IO-Compress/t/compress/any.pl Compress::Zlib
+ext/IO-Compress/t/compress/anyunc.pl Compress::Zlib
+ext/IO-Compress/t/compress/CompTestUtils.pm Compress::Zlib
+ext/IO-Compress/t/compress/destroy.pl Compress::Zlib
+ext/IO-Compress/t/compress/encode.pl Compress::Zlib
+ext/IO-Compress/t/compress/generic.pl Compress::Zlib
+ext/IO-Compress/t/compress/merge.pl Compress::Zlib
+ext/IO-Compress/t/compress/multi.pl Compress::Zlib
+ext/IO-Compress/t/compress/newtied.pl Compress::Zlib
+ext/IO-Compress/t/compress/oneshot.pl Compress::Zlib
+ext/IO-Compress/t/compress/prime.pl Compress::Zlib
+ext/IO-Compress/t/compress/tied.pl Compress::Zlib
+ext/IO-Compress/t/compress/truncate.pl Compress::Zlib
+ext/IO-Compress/t/compress/zlib-generic.pl Compress::Zlib
ext/IO-Compress/t/cz-01version.t IO::Compress
ext/IO-Compress/t/cz-05examples.t IO::Compress
ext/IO-Compress/t/cz-06gzsetp.t IO::Compress
t/lib/common.pl Helper for lib/{warnings,feature}.t
t/lib/commonsense.t See if configuration meets basic needs
t/lib/compmod.pl Helper for 1_compile.t
-t/lib/compress/any.pl Compress::Zlib
-t/lib/compress/anyunc.pl Compress::Zlib
-t/lib/compress/CompTestUtils.pm Compress::Zlib
-t/lib/compress/destroy.pl Compress::Zlib
-t/lib/compress/encode.pl Compress::Zlib
-t/lib/compress/generic.pl Compress::Zlib
-t/lib/compress/merge.pl Compress::Zlib
-t/lib/compress/multi.pl Compress::Zlib
-t/lib/compress/newtied.pl Compress::Zlib
-t/lib/compress/oneshot.pl Compress::Zlib
-t/lib/compress/prime.pl Compress::Zlib
-t/lib/compress/tied.pl Compress::Zlib
-t/lib/compress/truncate.pl Compress::Zlib
-t/lib/compress/zlib-generic.pl Compress::Zlib
t/lib/contains_bad_pod.xr Pod-Parser test file
t/lib/contains_pod.xr Pod-Parser test file
t/lib/croak.t Test calls to Perl_croak() in the C source.
t/lib/deprecate.t Test deprecate.pm
t/lib/Devel/switchd.pm Module for t/run/switchd.t
t/lib/Dev/Null.pm Test::More test module
-t/lib/dprof/test1_t Perl code profiler tests
-t/lib/dprof/test1_v Perl code profiler tests
-t/lib/dprof/test2_t Perl code profiler tests
-t/lib/dprof/test2_v Perl code profiler tests
-t/lib/dprof/test3_t Perl code profiler tests
-t/lib/dprof/test3_v Perl code profiler tests
-t/lib/dprof/test4_t Perl code profiler tests
-t/lib/dprof/test4_v Perl code profiler tests
-t/lib/dprof/test5_t Perl code profiler tests
-t/lib/dprof/test5_v Perl code profiler tests
-t/lib/dprof/test6_t Perl code profiler tests
-t/lib/dprof/test6_v Perl code profiler tests
-t/lib/dprof/test7_t Perl code profiler tests
-t/lib/dprof/test7_v Perl code profiler tests
-t/lib/dprof/test8_t Perl code profiler tests
-t/lib/dprof/test8_v Perl code profiler tests
-t/lib/dprof/V.pm Perl code profiler tests
t/lib/feature/bundle Tests for feature bundles
t/lib/feature/implicit Tests for implicit loading of feature.pm
t/lib/feature/nonesuch Tests for enabling/disabling nonexistent feature
t/lib/Filter/Simple/FilterOnlyTest.pm Helper file for Filter::Simple tests
t/lib/Filter/Simple/FilterTest.pm Helper file for Filter::Simple tests
t/lib/Filter/Simple/ImportTest.pm Helper file for Filter::Simple tests
-t/lib/filter-util.pl See if Filter::Util::Call works
t/lib/h2ph.h Test header file for h2ph
t/lib/h2ph.pht Generated output from h2ph.h by h2ph, for comparison
t/lib/locale/latin1 Part of locale.t in Latin 1
# NB: we use the CompTestUtils.pm
# from IO-Compress instead
qw( bzip2-src/bzip2-cpp.patch
- t/compress/CompTestUtils.pm
)
],
'CPAN' => 1,
'EXCLUDED' => [ qr{^t/Test/},
qw( t/000prereq.t
t/99pod.t
- t/compress/CompTestUtils.pm
)
],
'MAP' => { '' => 'ext/Compress-Raw-Zlib/',
- 't/compress/CompTestUtils.pm' =>
- 't/lib/compress/CompTestUtils.pm',
},
'CPAN' => 1,
'UPSTREAM' => undef,
'MAINTAINER' => 'dankogai',
'DISTRIBUTION' => 'DANKOGAI/Encode-2.35.tar.gz',
'FILES' => q[ext/Encode],
+ 'EXCLUDED' => [ qw{t/piconv.t} ], # FIXME
'CPAN' => 1,
'UPSTREAM' => undef,
},
'EXCLUDED' => [ qr{t/Test/},
qw{t/cz-03zlib-v1.t},
],
- 'MAP' => { 't/compress' => 't/lib/compress',
- '' => 'ext/IO-Compress/',
+ 'MAP' => { '' => 'ext/IO-Compress/',
},
'CPAN' => 1,
'UPSTREAM' => undef,
# Check for Module::Plugin support
my $res = runperl(
- switches => [ '-I../ext/B/t/pluglib', '-MO=Lint,none' ],
+ switches => [ '-It/pluglib', '-MO=Lint,none' ],
prog => 1,
stderr => 1,
);
@INC = qw(../lib . lib);
}
else {
- unshift @INC, 't';
+ unshift @INC, '../../t/lib'; # FIXME when PERL_CORE works again
+ # unshift @INC, 't';
}
require Config;
if ( ( $Config::Config{'extensions'} !~ /\bB\b/ ) ) {
#!./perl -w
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't';
- @INC = '../lib';
- }
-}
+use strict;
+
use Cwd;
+
chdir 't';
-use strict;
use Config;
use File::Spec;
use File::Path;
use strict;
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't';
- @INC = '../lib';
- }
-}
use Cwd;
-chdir 't';
+chdir 't' unless $ENV{PERL_CORE};
use File::Spec;
use lib File::Spec->catdir('t', 'lib');
#!./perl
-BEGIN {
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- }
-}
-
use File::Spec;
use lib File::Spec->catdir('t', 'lib');
use Test::More;
#!./perl -w
-
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib' if -d '../lib';
- }
-}
use warnings;
use strict;
use Config;
BEGIN {
- if(-d "lib" && -f "TEST") {
+ if($ENV{PERL_CORE}) {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
#!./perl
-
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib' if -d '../lib';
- }
-}
use warnings;
use strict;
use Config;
BEGIN {
- if(-d "lib" && -f "TEST") {
+ if($ENV{PERL_CORE}) {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
#!./perl -w
-
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib' if -d '../lib';
- }
-}
use warnings;
use strict;
use Config;
BEGIN {
- if(-d "lib" && -f "TEST") {
+ if($ENV{PERL_CORE}) {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
$num = 0;
$results = $expected = '';
$perl = $opt_p || $^X;
-$dpp = $opt_d || '../utils/dprofpp';
+$dpp = $opt_d || '../../utils/dprofpp';
$dpp .= '.com' if $^O eq 'VMS';
print "\nperl: $perl\n" if $opt_v;
#!perl
BEGIN {
- chdir( 't' ) if -d 't';
- @INC = '../lib';
- require './test.pl'; # for which_perl() etc
+ require 'test.pl'; # for which_perl() etc
require Config; import Config;
if ($Config{'extensions'} !~ /\bDevel\/DProf\b/){
print "1..0 # Skip: Devel::DProf was not built\n";
# -I Add to @INC
# -p Name of perl binary
-@tests = @ARGV ? @ARGV : sort (<lib/dprof/*_t>, <lib/dprof/*_v>); # glob-sort, for OS/2
+@tests = @ARGV ? @ARGV : sort (<dprof/*_t>, <dprof/*_v>); # glob-sort, for OS/2
$path_sep = $Config{path_sep} || ':';
$perl5lib = $opt_I || join( $path_sep, @INC );
sub verify {
my $test = shift;
- my $command = $perl.' "-I../lib" "-I./lib/dprof" '.$test;
+ my $command = $perl.' "-I./dprof" '.$test;
$command .= ' -v' if $opt_v;
$command .= ' -p '. $perl;
system $command;
BEGIN {
if ($ENV{'PERL_CORE'}) {
- chdir 't' if -d 't';
- @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
require Config; import Config;
use vars '%Config';
if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
BEGIN {
if ($ENV{'PERL_CORE'}) {
- chdir 't' if -d 't';
- @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
require Config; import Config;
use vars '%Config';
if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
#!./perl -T
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bDevel\/Peek\b/) {
print "1..0 # Skip: Devel::Peek was not built\n";
}
}
-BEGIN { require "./test.pl"; }
+BEGIN { require "../../t/test.pl"; }
use Devel::Peek;
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
# Test that md5 works on unaligned memory blocks
print "1..1\n";
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
print "1..3\n";
use strict;
print "ok ", ++$testno, " # Skip: PERL_CORE\n";
next;
}
- use File::Spec;
- my @path = qw(ext Digest-MD5);
- my $path = File::Spec->updir;
- while (@path) {
- $path = File::Spec->catdir($path, shift @path);
- }
- $file = File::Spec->catfile($path, $file);
}
# print "# file = $file\n";
unless (-f $file) {
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
use strict;
print "1..256\n";
+++ /dev/null
-#
-# $Id: piconv.t,v 0.2 2009/07/13 00:50:52 dankogai Exp $
-#
-
-BEGIN {
- if ( $ENV{'PERL_CORE'} ) {
- print "1..0 # Skip: Don't know how to test this within perl's core\n";
- exit 0;
- }
-}
-
-use strict;
-use FindBin;
-use File::Spec;
-use IPC::Open3 qw(open3);
-use IO::Select;
-use Test::More;
-
-my $WIN = $^O eq 'MSWin32';
-
-if ($WIN) {
- eval { require IPC::Run; IPC::Run->VERSION(0.83); 1; } or
- plan skip_all => 'Win32 environments require IPC::Run 0.83 to complete this test';
-}
-
-sub run_cmd (;$$);
-
-my $blib =
- File::Spec->rel2abs(
- File::Spec->catdir( $FindBin::RealBin, File::Spec->updir, 'blib' ) );
-my $script = File::Spec->catdir($blib, 'script', 'piconv');
-my @base_cmd = ( $^X, "-Mblib=$blib", $script );
-
-plan tests => 5;
-
-{
- my ( $st, $out, $err ) = run_cmd;
- is( $st, 0, 'status for usage call' );
- is( $out, $WIN ? undef : '' );
- like( $err, qr{^piconv}, 'usage' );
-}
-
-{
- my($st, $out, $err) = run_cmd [qw(-S foobar -f utf-8 -t ascii), $script];
- like($err, qr{unknown scheme.*fallback}i, 'warning for unknown scheme');
-}
-
-{
- my ( $st, $out, $err ) = run_cmd [qw(-f utf-8 -t ascii ./non-existing/file)];
- like( $err, qr{can't open}i );
-}
-
-sub run_cmd (;$$) {
- my ( $args, $in ) = @_;
-
- my $out = "x" x 10_000;
- $out = "";
- my $err = "x" x 10_000;
- $err = "";
-
- if ($WIN) {
- IPC::Run->import(qw(run timeout));
- my @cmd;
- if (defined $args) {
- @cmd = (@base_cmd, @$args);
- } else {
- @cmd = @base_cmd;
- }
- run(\@cmd, \$in, \$out, \$err, timeout(10));
- my $st = $?;
- $out = undef if ($out eq '');
- ( $st, $out, $err );
- } else {
- $in ||= '';
- my ( $in_fh, $out_fh, $err_fh );
- use Symbol 'gensym';
- $err_fh =
- gensym; # sigh... otherwise stderr gets just to $out_fh, not to $err_fh
- my $pid = open3( $in_fh, $out_fh, $err_fh, @base_cmd, @$args )
- or die "Can't run @base_cmd @$args: $!";
- print $in_fh $in;
- my $sel = IO::Select->new( $out_fh, $err_fh );
-
- while ( my @ready = $sel->can_read ) {
- for my $fh (@ready) {
- if ( eof($fh) ) {
- $sel->remove($fh);
- last if !$sel->handles;
- }
- elsif ( $out_fh == $fh ) {
- my $line = <$fh>;
- $out .= $line;
- }
- elsif ( $err_fh == $fh ) {
- my $line = <$fh>;
- $err .= $line;
- }
- }
- }
- my $st = $?;
- ( $st, $out, $err );
- }
-}
#!./perl -w
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
- } else {
- @INC = '../lib';
- }
- }
-}
-
use Test::More tests => 10;
BEGIN {
#!./perl
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
# A modest test: exercises only O_WRONLY, O_CREAT, and O_RDONLY.
# Have to be modest to be portable: could possibly extend testing
# also to O_RDWR and O_APPEND, but dunno about the portability of,
#!./perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
+ require 'test.pl';
}
plan tests => 2;
# If you modify/add tests here, remember to update also t/op/lfs.t.
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
# Don't bother if there are no quad offsets.
if ($Config{lseeksize} < 8) {
BEGIN {
if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib');
-
require Config; import Config;
%Config=%Config if 0; # cease -w
if ($Config{'extensions'} !~ m{\bFilter/Util/Call\b}) {
print "1..0 # Skip: Filter::Util::Call was not built\n";
exit 0;
}
- require 'lib/filter-util.pl';
- }
- else {
- require 'filter-util.pl';
}
+ require 'filter-util.pl';
}
use strict;
# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bGDBM_File\b/) {
print "1..0 # Skip: GDBM_File was not built\n";
#!/usr/bin/perl -w
BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
+ if ($ENV{PERL_CORE}) {
require Config;
if ($Config::Config{'extensions'} !~ /\bSocket\b/) {
print "1..0 # Skip: Socket not built - IO.pm uses Socket";
exit 0;
}
+ }
}
use strict;
use File::Path;
use File::Spec;
-require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
+require($ENV{PERL_CORE} ? "../../t/test.pl" : "./t/test.pl");
plan(tests => 18);
{
-
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
use Config;
BEGIN {
#!./perl
BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- require Config; import Config;
- if ($] < 5.00326 || not $Config{'d_readdir'}) {
- print "1..0 # Skip: readdir() not available\n";
- exit 0;
+ if ($ENV{PERL_CORE}) {
+ require Config; import Config;
+ if ($] < 5.00326 || not $Config{'d_readdir'}) {
+ print "1..0 # Skip: readdir() not available\n";
+ exit 0;
+ }
}
- require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
+ require($ENV{PERL_CORE} ? "../../t/test.pl" : "./t/test.pl");
plan(16);
use_ok('IO::Dir');
#!./perl
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
use Config;
BEGIN {
#!./perl -w
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
use strict;
-require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
+require($ENV{PERL_CORE} ? "../../t/test.pl" : "./t/test.pl");
plan(tests => ($^O =~ /MSWin32/ ? 9 : 6));
my $Class = 'IO::File';
BEGIN {
$File = __FILE__;
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- $File =~ s/^t\W+//; # Remove first directory
- @INC = '../lib';
- }
require strict; import strict;
}
#!./perl
BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
use Config;
my $can_fork = $Config{d_fork} ||
my $perl;
BEGIN {
- unless(grep /blib/, @INC) {
- $perl = './perl';
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- $perl = $^X;
- }
+ $perl = $^X;
}
use Config;
#!./perl
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
if ($^O eq 'mpeix') {
print "1..0 # Skip: broken on MPE/iX\n";
exit 0;
#!./perl -w
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
select(STDERR); $| = 1;
select(STDOUT); $| = 1;
#!./perl -w
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
use Config;
BEGIN {
#!./perl -T
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
use Config;
BEGIN {
use strict;
if ($ENV{PERL_CORE}) {
- require("./test.pl");
+ require("../../t/test.pl");
}
else {
require("./t/test.pl");
#!./perl
BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- $tell_file = "TEST";
- }
- else {
- $tell_file = "Makefile";
- }
+ $tell_file = "Makefile";
}
use Config;
#!./perl
BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
use Config;
my $reason;
#!./perl
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
use Config;
BEGIN {
#!./perl
BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
unless ($] >= 5.008 and find PerlIO::Layer 'perlio') {
print "1..0 # Skip: not perlio\n";
exit 0;
}
}
-require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
+require($ENV{PERL_CORE} ? "../../t/test.pl" : "./t/test.pl");
plan(tests => 5);
#!./perl
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
use Config;
BEGIN {
BEGIN
{
$| = 1;
- chdir 't' if -d 't';
+ chdir 't' if -d 't' && !$ENV{PERL_CORE};
unshift @INC, '../lib'; # for running manually
unshift @INC, '../blib/arch'; # for running manually
plan tests => 359;
unshift @INC, '../blib/lib';
unshift @INC, '../blib/arch';
unshift @INC, '../lib';
- chdir 't' if -d 't';
+ chdir 't' if -d 't' && !$ENV{PERL_CORE};
plan tests => 1;
};
BEGIN
{
$| = 1;
- chdir 't' if -d 't';
+ chdir 't' if -d 't' && !$ENV{PERL_CORE};
unshift @INC, ('../lib', '../blib/arch'); # for running manually
plan tests => 22;
}
unshift @INC, '../blib/arch';
my $location = $0; $location =~ s/mbi_rand.t//;
unshift @INC, $location; # to locate the testing files
- chdir 't' if -d 't';
+ chdir 't' if -d 't' && !$ENV{PERL_CORE};
$count = 128;
plan tests => $count*2;
}
# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bNDBM_File\b/) {
print "1..0 # Skip: NDBM_File was not built\n";
# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bODBM_File\b/ or $Config{'d_cplusplus'}) {
print "1..0 # Skip: ODBM_File was not built\n";
$|=1;
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
print "1..0\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
print "1..0\n";
#!./perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($^O ne 'VMS' and $Config{'extensions'} !~ /\bPOSIX\b/) {
print "1..0\n";
# Expected number of tests is one each for every combination of a
# known is<xxx> function and string listed above.
-require './test.pl';
+require '../../t/test.pl';
plan(tests => keys(%classes) * keys(%functions));
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($^O ne 'VMS' and $Config{'extensions'} !~ /\bPOSIX\b/) {
print "1..0\n";
}
}
-BEGIN { require "./test.pl"; }
+BEGIN { require "../../t/test.pl"; }
plan(tests => 66);
use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write
}
-ok( $testfd = open("TEST", O_RDONLY, 0), 'O_RDONLY with open' );
+ok( $testfd = open("Makefile.PL", O_RDONLY, 0), 'O_RDONLY with open' );
read($testfd, $buffer, 4) if $testfd > 2;
-is( $buffer, "#!./", ' with read' );
+is( $buffer, "# Ex", ' with read' );
TODO:
{
}
my $pat;
-if ($Is_MacOS) {
- $pat = qr/:t:$/;
-}
-elsif ( $unix_mode ) {
- $pat = qr#[\\/]t$#i;
+if ( $unix_mode ) {
+ $pat = qr#[\\/]POSIX$#i;
}
else {
- $pat = qr/\.T]/i;
+ $pat = qr/\.POSIX]/i;
}
like( getcwd(), qr/$pat/, 'getcwd' );
#!./perl
-BEGIN {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
-}
-
BEGIN{
# Don't do anything if POSIX is missing, or sigaction missing.
use Config;
#!perl -T
BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't';
- @INC = '../lib';
- }
-
use Config;
use Test::More;
plan skip_all => "POSIX is unavailable" if $Config{'extensions'} !~ m!\bPOSIX\b!;
#!./perl -Tw
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($^O ne 'VMS' and $Config{'extensions'} !~ /\bPOSIX\b/) {
print "1..0\n";
my $TAINT = substr($^X, 0, 0);
-my $file = 'TEST';
+my $file = 'POSIX.xs';
eval { mkfifo($TAINT. $file, 0) };
like($@, qr/^Insecure dependency/, 'mkfifo with tainted data');
is($@, "", 'open with untainted data');
read($testfd, $buffer, 2) if $testfd > 2;
-is( $buffer, "#!", ' read' );
+is( $buffer, "#d", ' read' );
ok(tainted($buffer), ' scalar tainted');
TODO: {
#!perl -T
BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't';
- @INC = '../lib';
- }
-
use Config;
use Test::More;
plan skip_all => "POSIX is unavailable"
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
-}
-
-BEGIN {
use Config;
unless ($Config{d_fork}) {
print "1..0 # Skip: no fork\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
- require "../t/test.pl";
+ require "../../t/test.pl";
skip_all("No perlio") unless (find PerlIO::Layer 'perlio');
if (ord("A") == 193) {
print "1..0 # Skip: EBCDIC\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
unless (find PerlIO::Layer 'perlio') {
print "1..0 # Skip: not perlio\n";
exit 0;
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
unless (find PerlIO::Layer 'perlio') {
print "1..0 # Skip: not perlio\n";
exit 0;
# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bSDBM_File\b/) {
print "1..0 # Skip: no SDBM_File\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bSocket\b/ &&
!(($^O eq 'VMS') && $Config{d_socket})) {
my $has_perlio;
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
$can_fork = $Config{'d_fork'} || $Config{'d_pseudofork'};
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bSys\/Hostname\b/) {
print "1..0 # Skip: Sys::Hostname was not built\n";
#!perl -T
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't';
- @INC = '../lib';
- }
-}
-
use strict;
use Config;
use File::Spec;
return sub { $died = 1 }
}
- my $sample_tests;
- if ( $ENV{PERL_CORE} ) {
- my $updir = File::Spec->updir;
- $sample_tests = File::Spec->catdir(
- $updir, 'ext', 'Test-Harness', 't',
- 'sample-tests'
- );
- }
- else {
- my $curdir = File::Spec->curdir;
- $sample_tests = File::Spec->catdir( $curdir, 't', 'sample-tests' );
- }
+ my $curdir = File::Spec->curdir;
+ my $sample_tests = File::Spec->catdir( $curdir, 't', 'sample-tests' );
{
local $SIG{__DIE__} = prepare_for_death();
#!/usr/bin/perl -w
-BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- use lib 't/lib';
- }
-}
+use lib 't/lib';
use strict;
tie *NULL, 'Dev::Null' or die $!;
select NULL;
my ( $tot, $failed ) = Test::Harness::execute_tests(
- tests => [
- $ENV{PERL_CORE}
- ? '../ext/Test-Harness/t/sample-tests/inc_taint'
- : 't/sample-tests/inc_taint'
- ]
+ tests => ['t/sample-tests/inc_taint']
);
select STDOUT;
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
# unset this global when self-testing ('testcover' and etc issue)
local $ENV{HARNESS_PERL_SWITCHES};
-my $TEST_DIR
- = $ENV{PERL_CORE} ? '../ext/Test-Harness/t/sample-tests' : 't/sample-tests';
+my $TEST_DIR = 't/sample-tests';
{
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
my $HARNESS = 'TAP::Harness';
-my $source_tests
- = $ENV{PERL_CORE} ? '../ext/Test-Harness/t/source_tests' : 't/source_tests';
-my $sample_tests
- = $ENV{PERL_CORE} ? '../ext/Test-Harness/t/sample-tests' : 't/sample-tests';
+my $source_tests = 't/source_tests';
+my $sample_tests = 't/sample-tests';
plan tests => 56;
use strict;
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use Test::More tests => 94;
$harness->runtests(
File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir, 'ext', 'Test-Harness' )
- : ()
- ),
't',
'sample-tests',
'bailout'
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
my $aggregate = $harness->runtests(
File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir, 'ext', 'Test-Harness' )
- : ()
- ),
't',
'sample-tests',
'simple'
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
my $HARNESS = 'TAP::Harness';
-my $source_tests
- = $ENV{PERL_CORE} ? '../ext/Test-Harness/t/source_tests' : 't/source_tests';
-my $sample_tests
- = $ENV{PERL_CORE} ? '../ext/Test-Harness/t/sample-tests' : 't/sample-tests';
+my $source_tests = 't/source_tests';
+my $sample_tests = 't/sample-tests';
plan tests => 119;
eval {
_runtests(
$harness,
- $ENV{PERL_CORE}
- ? '../ext/Test-Harness/t/data/catme.1'
- : 't/data/catme.1'
+ 't/data/catme.1'
);
};
exec => sub {
return [
$cat,
- $ENV{PERL_CORE}
- ? '../ext/Test-Harness/t/data/catme.1'
- : 't/data/catme.1'
+ 't/data/catme.1'
];
},
}
{ verbosity => -2,
stdout => $capture,
exec => sub {
- open my $fh,
- $ENV{PERL_CORE}
- ? '../ext/Test-Harness/t/data/catme.1'
- : 't/data/catme.1';
+ open my $fh, 't/data/catme.1';
return $fh;
},
}
# coverage tests for the basically untested T::H::_open_spool
my @spool = (
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness' )
- : ()
- ),
( 't', 'spool' )
);
$ENV{PERL_TEST_HARNESS_DUMP_TAP} = File::Spec->catfile(@spool);
command => [
$^X,
File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness' )
- : ()
- ),
't',
'sample-tests',
'out_err_mix'
return [
TAP::Parser->new(
{ source => File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness'
- )
- : ()
- ),
't',
'sample-tests',
'simple'
return map {
[ TAP::Parser->new(
{ source => File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext',
- 'Test-Harness'
- )
- : ()
- ),
't',
'sample-tests',
'simple'
( map {
[ TAP::Parser->new(
{ source => File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext',
- 'Test-Harness'
- )
- : ()
- ),
't',
'sample-tests',
'simple'
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- use lib 't/lib';
- }
+ use lib 't/lib';
}
use strict;
use NoFork;
-require(
- ( $ENV{PERL_CORE} ? '../ext/Test-Harness/' : '' ) . 't/multiplexer.t' );
+require( 't/multiplexer.t' );
# check nofork logic on systems which *can* fork()
# NOTE maybe a good candidate for xt/author or something.
-BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- use lib 't/lib';
- }
-}
+use lib 't/lib';
use strict;
stdout => $capture,
}
);
- $harness->runtests( ( $ENV{PERL_CORE} ? '../ext/Test-Harness/' : '' )
- . 't/sample-tests/simple' );
+ $harness->runtests( 't/sample-tests/simple' );
my @output = tied($$capture)->dump;
is pop @output, "Result: PASS\n", 'status OK';
pop @output; # get rid of summary line
use strict;
-BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- use lib 't/lib';
- }
-}
+use lib 't/lib';
use Test::More tests => 294;
use IO::c55Capture;
# Check source => $filehandle
can_ok $PARSER, 'new';
-open my $fh, $ENV{PERL_CORE}
- ? '../ext/Test-Harness/t/data/catme.1'
- : 't/data/catme.1';
+open my $fh, 't/data/catme.1';
$parser = $PARSER->new( { source => $fh } );
isa_ok $parser, $PARSER, '... and calling it should succeed';
ok @results = _get_results($parser), 'The parser should return results';
my $parser = TAP::Parser->new(
{ source => File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness' )
- : ()
- ),
't',
'sample-tests',
'simple'
#!/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_ok('MyIteratorFactory');
use_ok('MyResultFactory');
-my @t_path = $ENV{PERL_CORE} ? ( updir(), 'ext', 'Test-Harness' ) : ();
-my $source = catfile( @t_path, 't', 'source_tests', 'source' );
+my $source = catfile( 't', 'source_tests', 'source' );
my %customize = (
source_class => 'MySource',
perl_source_class => 'MyPerlSource',
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
use_ok('TAP::Parser::SubclassTest');
# TODO: foreach my $source ( ... )
-my @t_path = $ENV{PERL_CORE} ? ( updir(), 'ext', 'Test-Harness' ) : ();
-
{ # perl source
%INIT = %CUSTOM = ();
- my $source = catfile( @t_path, 't', 'subclass_tests', 'perl_source' );
+ my $source = catfile( 't', 'subclass_tests', 'perl_source' );
my $p = TAP::Parser::SubclassTest->new( { source => $source } );
# The grammar is lazily constructed so we need to ask for it to
unless ( -e $cat ) {
skip "no '$cat'", 4;
}
- my $file = catfile( @t_path, 't', 'data', 'catme.1' );
+ my $file = catfile( 't', 'data', 'catme.1' );
my $p = TAP::Parser::SubclassTest->new( { exec => [ $cat => $file ] } );
is( $INIT{MySource}, 1, 'initialized MySource subclass' );
);
my $source = File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness' )
- : ()
- ),
't',
'sample-tests',
'delayed'
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
args => {
argv => [qw( one two three )],
},
- proverc => $ENV{PERL_CORE} ? '../ext/Test-Harness/t/proverc/emptyexec' : 't/proverc/emptyexec',
+ proverc => 't/proverc/emptyexec',
switches => [$dummy_test],
expect => { exec => '' },
runlog => [
#!/usr/bin/perl -w
-BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', 'lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
use strict;
use lib 't/lib';
use Test::More tests => 1;
$prove->add_rc_file(
File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness' )
- : ()
- ),
't', 'data',
'proverc'
)
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', 'lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
# let's fully expand that filename
$test->{file} = File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness' )
- : ()
- ),
't',
'sample-tests',
$test->{file}
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = '../lib';
- }
- else {
- push @INC, 't/lib';
- }
+ push @INC, 't/lib';
}
use strict;
my $SAMPLE_TESTS = File::Spec->catdir(
File::Spec->curdir,
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness' )
- : ()
- ),
't',
'sample-tests'
);
# Used to test Process.pm
-BEGIN {
- if ( $ENV{PERL_CORE} ) {
- @INC = '../lib';
- }
-}
-
use Time::HiRes qw(sleep);
my $delay = 0.01;
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
my $parser = EmptyParser->new;
my $test = File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness' )
- : ()
- ),
't',
'source_tests',
'source'
BEGIN {
if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../../lib', 't/lib' );
}
else {
unshift @INC, 't/lib';
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', 'lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
# test T::H::_open_spool and _close_spool - these are good examples
# coverage tests for the basically untested T::H::_open_spool
- my @spool = ( $ENV{PERL_CORE} ? ('spool') : ( 't', 'spool' ) );
+ my @spool = ( 't', 'spool' );
$ENV{PERL_TEST_HARNESS_DUMP_TAP} = File::Spec->catfile(@spool);
# now given that we're going to be writing stuff to the file system, make sure we have
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
use App::Prove::State::Result;
sub mn {
- my $pfx = $ENV{PERL_CORE} ? '../ext/Test-Harness/' : '';
- return map {"$pfx$_"} @_;
+ # FIXME - remove this.
+ return @_;
}
my @schedule = (
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
use strict;
#!/usr/bin/perl -w
BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ( '../lib', 'lib' );
- }
- else {
- unshift @INC, 't/lib';
- }
+ unshift @INC, 't/lib';
}
# Test that options in PERL5OPT are propogated to tainted tests
}
{
- local $ENV{PERL5OPT} = $ENV{PERL_CORE} ? '-I../lib -Mstrict' : '-Mstrict';
+ local $ENV{PERL5OPT} = $ENV{PERL_CORE} ? '-I../../lib -Mstrict' : '-Mstrict';
run_test_file(<<'END');
#!/usr/bin/perl -T
#!/usr/bin/perl -w
-BEGIN {
- chdir 't' and @INC = '../lib' if $ENV{PERL_CORE};
-}
-
use strict;
use lib 't/lib';
use App::Prove;
my $test = File::Spec->catfile(
- ( $ENV{PERL_CORE}
- ? ( File::Spec->updir(), 'ext', 'Test-Harness' )
- : ()
- ),
't',
'sample-tests',
'echo'
#!/usr/bin/perl -w
-BEGIN {
- chdir 't' and @INC = '../lib' if $ENV{PERL_CORE};
-}
-
use strict;
use lib 't/lib';
#
#
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
use Text::Soundex;
$test = 0;
# DAPM Aug 2004
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
# use Test::More tests => 240;
BEGIN {
- require './test.pl';
+ require '../../t/test.pl';
plan(240);
use_ok('XS::APItest')
};
# a new jump level but before pushing an eval context, leading to
# stack corruption
-fresh_perl_is(<<'EOF', "x=2", { switches => ['-T'] }, 'eval_sv() taint');
+fresh_perl_is(<<'EOF', "x=2", { switches => ['-T', '-I../../lib'] }, 'eval_sv() taint');
use XS::APItest;
my $x = 0;
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
#!perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
my $threads;
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
#!perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
*hint_exists = *hint_exists = \&XS::APItest::Hash::refcounted_he_exists;
*hint_fetch = *hint_fetch = \&XS::APItest::Hash::refcounted_he_fetch;
-require './op/caller.pl';
+require '../../t/op/caller.pl';
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
#!perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
#!perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
push @INC, "::lib:$MacPerl::Architecture:" if $^O eq 'MacOS';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/APItest\b/) {
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bXS\/Typemap\b/) {
print "1..0 # Skip: XS::Typemap was not built\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config;
if (($Config::Config{'extensions'} !~ /\bre\b/) ){
print "1..0 # Skip -- Perl configured without re module\n";
# must use a BEGIN or the prototypes wont be respected meaning
# tests could pass that shouldn't
-BEGIN { require "./test.pl"; }
-my $out = runperl(progfile => "../ext/re/t/lexical_debug.pl", stderr => 1 );
+BEGIN { require "../../t/test.pl"; }
+my $out = runperl(progfile => "t/lexical_debug.pl", stderr => 1 );
print "1..10\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config;
if (($Config::Config{'extensions'} !~ /\bre\b/) ){
print "1..0 # Skip -- Perl configured without re module\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config;
if (($Config::Config{'extensions'} !~ /\bre\b/) ){
print "1..0 # Skip -- Perl configured without re module\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config;
if (($Config::Config{'extensions'} !~ /\bre\b/) ){
print "1..0 # Skip -- Perl configured without re module\n";
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config;
if (($Config::Config{'extensions'} !~ /\bre\b/) ){
print "1..0 # Skip -- Perl configured without re module\n";
}
use strict;
-BEGIN { require "./test.pl"; }
+BEGIN { require "../../t/test.pl"; }
our $NUM_SECTS;
chomp(my @strs= grep { !/^\s*\#/ } <DATA>);
-my $out = runperl(progfile => "../ext/re/t/regop.pl", stderr => 1 );
+my $out = runperl(progfile => "t/regop.pl", stderr => 1 );
# VMS currently embeds linefeeds in the output.
$out =~ s/\cJ//g if $^O = 'VMS';
my @tests = grep { /\S/ } split /(?=Compiling REx)/, $out;
Offsets: [12]
1:1[3] 3:4[0]
%MATCHED%
-Freeing REx: "[q]"
\ No newline at end of file
+Freeing REx: "[q]"
# Import test.pl into its own package
{
package Test;
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
}
use Config;
# Import test.pl into its own package
{
package Test;
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
}
use Config;
use warnings;
BEGIN {
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
use Config;
if (! $Config{'useithreads'}) {
use warnings;
BEGIN {
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
use Config;
if (! $Config{'useithreads'}) {
# Import test.pl into its own package
{
package Test;
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
}
use Config;
# Import test.pl into its own package
{
package Test;
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
}
use Config;
use warnings;
BEGIN {
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
use Config;
if (! $Config{'useithreads'}) {
use warnings;
BEGIN {
- require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl');
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
use Config;
if (! $Config{'useithreads'}) {
# In which case, we need to stop t/TEST actually running tests, as all
# t/harness needs are its subroutines.
+
+# directories with special sets of test switches
+my %dir_to_switch =
+ (base => '',
+ comp => '',
+ run => '',
+ '../ext/File-Glob/t' => '-I. -MTestInit', # FIXME - tests assume t/
+ );
+
+my %temp_no_core =
+ ('../ext/Attribute-Handlers' => 1,
+ '../ext/B' => 'fixme',
+ '../ext/Compress-Raw-Bzip2' => 1,
+ '../ext/Compress-Raw-Zlib' => 1,
+ '../ext/Data-Dumper' => 'fixme',
+ '../ext/Devel-PPPort' => 1,
+ '../ext/DynaLoader' => 'fixme',
+ '../ext/Encode' => 1,
+ '../ext/Hash-Util' => 'fixme',
+ '../ext/Hash-Util-FieldHash' => 'fixme',
+ '../ext/I18N-Langinfo' => 'fixme',
+ '../ext/IO-Compress' => 1,
+ '../ext/IPC-SysV' => 1,
+ '../ext/MIME-Base64' => 1,
+ '../ext/Safe' => 'fixme',
+ '../ext/Storable' => 'fixme',
+ '../ext/Time-HiRes' => 1,
+ '../ext/Unicode-Normalize' => 1,
+ );
+
+# Fix Text-Soundex
+# Fix Win32
+
if ($::do_nothing) {
return 1;
}
return { file => $file_opts, switch => $switch };
}
-
-# directories with special sets of test switches
-my %dir_to_switch =
- (base => '',
- comp => '',
- run => '',
- );
-
+
sub _run_test {
my($harness, $test, $type) = @_;
if (!defined $type) {
}
my $options = _scan_test($test, $type);
+ my $return_dir;
my $perl = './perl';
my $lib = '../lib';
- $test =~ /^([^\/]+)/;
+ $test =~ /^(.+)\/[^\/]+/;
+ my $dir = $1;
+ my $ext_dir;
- my $testswitch = $dir_to_switch{$1};
+ my $testswitch = $dir_to_switch{$dir};
if (!defined $testswitch) {
- $testswitch = '-I. -MTestInit'; # -T will remove . from @INC
+ if ($test =~ s!^(\.\./ext/[^/]+)/t!t!) {
+ $ext_dir = $1;
+ $return_dir = '../../t';
+ $lib = '../../lib';
+ $perl = '../../perl';
+ $testswitch = "-I$return_dir -MTestInit=U2T,A";
+ if ($temp_no_core{$ext_dir}) {
+ $testswitch = $testswitch . ',NC';
+ }
+ chdir $ext_dir or die "Can't chdir to '$ext_dir': $!";
+ } else {
+ $testswitch = '-I. -MTestInit'; # -T will remove . from @INC
+ }
}
my $utf8 = $::with_utf8 ? '-I$lib -Mutf8' : '';
or print "can't deparse '$deparse_cmd': $!.\n";
}
elsif ($type eq 'perl') {
- my $perl = $ENV{PERL} || $perl;
my $redir = $^O eq 'VMS' ? '2>&1' : '';
if ($ENV{PERL_VALGRIND}) {
open($results, $run) or print "can't run '$run': $!.\n";
}
+ if ($return_dir) {
+ chdir $return_dir
+ or die "Can't chdir from '$ext_dir' to '$return_dir': $!";
+ }
+
# Our environment may force us to use UTF-8, but we can't be sure that
# anything we're reading from will be generating (well formed) UTF-8
# This may not be the best way - possibly we should unset ${^OPEN} up
$VERSION = 1.02;
+# This is incompatible with the import options.
chdir 't' if -f 't/TestInit.pm';
# Let tests know they're running in the perl core. Useful for modules
# This feels like a better solution than the original, from
# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-07/msg00154.html
$ENV{PERL_CORE} = $^X;
-if (${^TAINT}) {
- @INC = '../lib';
-} else {
- @INC = ('../lib', '.');
+
+sub new_inc {
+ if (${^TAINT}) {
+ @INC = @_;
+ } else {
+ @INC = (@_, '.');
+ }
+}
+
+sub set_opt {
+ my $sep;
+ if ($^O eq 'VMS') {
+ $sep = '|';
+ } elsif ($^O eq 'Win32') {
+ $sep = ';';
+ } else {
+ $sep = ':';
+ }
+
+ my $lib = join $sep, @_;
+ if (exists $ENV{PERL5LIB}) {
+ $ENV{PERL5LIB} = $lib . substr $ENV{PERL5LIB}, 0, 0;
+ } else {
+ $ENV{PERL5LIB} = $lib;
+ }
+}
+
+new_inc('../lib');
+
+sub import {
+ my $self = shift;
+ my $abs;
+ foreach (@_) {
+ if ($_ eq 'U2T') {
+ @new_inc = ('../../lib', '../../t');
+ } elsif ($_ eq 'NC') {
+ delete $ENV{PERL_CORE}
+ } elsif ($_ eq 'A') {
+ $abs = 1;
+ } else {
+ die "Unknown option '$_'";
+ }
+ }
+
+ if ($abs) {
+ if(!@new_inc) {
+ @new_inc = '../lib';
+ }
+ @INC = @new_inc;
+ require File::Spec::Functions;
+ # Forcibly untaint this.
+ @new_inc = map { $_ = File::Spec::Functions::rel2abs($_); /(.*)/; $1 }
+ @new_inc;
+ $^X = File::Spec::Functions::rel2abs($^X);
+ }
+
+ if (@new_inc) {
+ new_inc(@new_inc);
+ set_opt(@new_inc);
+ }
}
$0 =~ s/\.dp$//; # for the test.deparse make target