@echo "to build lib/Config.pm or lib/lib.pm."
@echo " "
- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
- && $(LDLIBPTH) ./perl TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+ && $(LDLIBPTH) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
# Test via harness
$bytecompile = 1 if $1 eq 'bytecompile';
$compile = 1 if $1 eq 'compile';
$taintwarn = 1 if $1 eq 'taintwarn';
+ $ENV{PERL_CORE_MINITEST} = 1 if $1 eq 'minitest';
if ($1 =~ /^deparse(,.+)?$/) {
$deparse = 1;
$deparse_opts = $1;
}
use Config;
-use Errno;
-
+BEGIN {
+ eval {require Errno; Errno->import;};
+}
plan(tests => 9);
ok( binmode(STDERR), 'STDERR made binary' );
ok( binmode(STDOUT, ":crlf"), ' and crlf' );
SKIP: {
+ skip "minitest", 1 if $ENV{PERL_CORE_MINITEST};
skip "no EBADF", 1 if (!exists &Errno::EBADF);
no warnings 'io';
SKIP:
{
- eval 'use PerlIO::scalar';
- skip(q/miniperl cannnot load PerlIO::scalar/)
- if $@ =~ /dynamic loading not available/;
+ skip("miniperl can't rely on loading PerlIO::scalar")
+ if $ENV{PERL_CORE_MINITEST};
+ eval 'PerlIO::scalar';
my $fcontents = join "", map {"$_\015\012"} "a".."zzz";
open my $fh, "<:crlf", \$fcontents;
local $/ = "xxx";
__EOH__
SKIP: {
+ # FIXME - more of these could be tested without Encode or full perl
skip("This perl does not have Encode", $NTEST)
unless " $Config{extensions} " =~ / Encode /;
+ skip("miniperl does not have Encode", $NTEST) if $ENV{PERL_CORE_MINITEST};
sub check {
my ($result, $expected, $id) = @_;
SKIP: {
skip "This perl uses perlio", 1 if $Config{useperlio};
- skip "This system doesn't understand EINVAL", 1 unless exists $!{EINVAL};
+ skip "miniperl cannot be relied on to load %Errno"
+ if $ENV{PERL_CORE_MINITEST};
+ # Force the reference to %! to be run time by writing ! as {"!"}
+ skip "This system doesn't understand EINVAL", 1
+ unless exists ${"!"}{EINVAL};
no warnings 'io';
- ok( !open(F,'>',\my $s) && $!{EINVAL}, 'open(reference) raises EINVAL' );
+ ok(!open(F,'>',\my $s) && ${"!"}{EINVAL}, 'open(reference) raises EINVAL');
}
{
}
use strict 'vars';
-use Errno;
+eval 'use Errno';
+die $@ if $@ and !$ENV{PERL_CORE_MINITEST};
print "1..19\n";
print "";
}
+$\ = '';
+
if (!exists &Errno::EBADF) {
print "ok 19 # skipped: no EBADF\n";
} else {
}
use strict;
-use Errno;
+eval 'use Errno';
+die $@ if $@ and !$ENV{PERL_CORE_MINITEST};
plan tests => 2;
print "1..53\n";
-$Is_MSWin32 = $^O eq 'MSWin32';
-$Is_NetWare = $^O eq 'NetWare';
-$Is_VMS = $^O eq 'VMS';
-$Is_Dos = $^O eq 'dos';
-$Is_os2 = $^O eq 'os2';
-$Is_Cygwin = $^O eq 'cygwin';
-$Is_MacOS = $^O eq 'MacOS';
-$Is_MPE = $^O eq 'mpeix';
+$Is_MSWin32 = $^O eq 'MSWin32';
+$Is_NetWare = $^O eq 'NetWare';
+$Is_VMS = $^O eq 'VMS';
+$Is_Dos = $^O eq 'dos';
+$Is_os2 = $^O eq 'os2';
+$Is_Cygwin = $^O eq 'cygwin';
+$Is_MacOS = $^O eq 'MacOS';
+$Is_MPE = $^O eq 'mpeix';
+$Is_miniperl = $ENV{PERL_CORE_MINITEST};
$PERL = ($Is_NetWare ? 'perl' :
($Is_MacOS || $Is_VMS) ? $^X :
skip('no caseless %ENV support') for 1..4;
}
-{
+if ($Is_miniperl) {
+ skip ("miniperl can't rely on loading %Errno");
+} else {
no warnings 'void';
# Make sure Errno hasn't been prematurely autoloaded
}, $@;
}
+if ($Is_miniperl) {
+ skip ("miniperl can't rely on loading %Errno");
+} else {
+ # Make sure that Errno loading doesn't clobber $!
-# Make sure that Errno loading doesn't clobber $!
-
-undef %Errno::;
-delete $INC{"Errno.pm"};
+ undef %Errno::;
+ delete $INC{"Errno.pm"};
-open(FOO, "nonesuch"); # Generate ENOENT
-my %errs = %{"!"}; # Cause Errno.pm to be loaded at run-time
-ok ${"!"}{ENOENT};
+ open(FOO, "nonesuch"); # Generate ENOENT
+ my %errs = %{"!"}; # Cause Errno.pm to be loaded at run-time
+ ok ${"!"}{ENOENT};
+}
ok $^S == 0 && defined $^S;
eval { ok $^S == 1 };