summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-02-21 14:14:30 +0000
committerNicholas Clark <nick@ccl4.org>2011-02-21 14:14:30 +0000
commitc82d0e1e6a50cf66206d7e33fb271f6ee9f3395b (patch)
tree0d9fe7d03b9335977283e9e50f2b8fa72aaac52e
parentf977b7bb0e0946aca578868ac597c28bdbc2c2c2 (diff)
downloadperl-c82d0e1e6a50cf66206d7e33fb271f6ee9f3395b.tar.gz
Add skip_all_if_miniperl() to test.pl, and use it in 6 test scripts
All require dynamic loading to work, so all should be skipped under minitest.
-rw-r--r--t/io/iofile.t1
-rw-r--r--t/op/concat2.t1
-rw-r--r--t/op/filehandle.t1
-rw-r--r--t/op/groups.t2
-rw-r--r--t/re/fold_grind.t1
-rw-r--r--t/re/reg_nc_tie.t1
-rw-r--r--t/test.pl4
7 files changed, 11 insertions, 0 deletions
diff --git a/t/io/iofile.t b/t/io/iofile.t
index 9a5b278289..f2ac66fb9c 100644
--- a/t/io/iofile.t
+++ b/t/io/iofile.t
@@ -4,6 +4,7 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
+ skip_all_if_miniperl("miniperl can't load IO::File");
}
$| = 1;
diff --git a/t/op/concat2.t b/t/op/concat2.t
index d728061a09..2a66c3c07b 100644
--- a/t/op/concat2.t
+++ b/t/op/concat2.t
@@ -9,6 +9,7 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
+ skip_all_if_miniperl("no dynamic loading on miniperl, no Encode");
}
plan 1;
diff --git a/t/op/filehandle.t b/t/op/filehandle.t
index 408c6701c1..ca29069609 100644
--- a/t/op/filehandle.t
+++ b/t/op/filehandle.t
@@ -7,6 +7,7 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
+ skip_all_if_miniperl("no dynamic loading on miniperl, no IO, hence no FileHandle");
}
plan 4;
diff --git a/t/op/groups.t b/t/op/groups.t
index ed549a0b59..d90884fe3e 100644
--- a/t/op/groups.t
+++ b/t/op/groups.t
@@ -12,6 +12,8 @@ BEGIN {
chdir 't';
@INC = '../lib';
+ require './test.pl';
+ skip_all_if_miniperl("no dynamic loading on miniperl, no POSIX");
}
use 5.010;
use strict;
diff --git a/t/re/fold_grind.t b/t/re/fold_grind.t
index b2a375478b..547643eb47 100644
--- a/t/re/fold_grind.t
+++ b/t/re/fold_grind.t
@@ -8,6 +8,7 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
+ skip_all_if_miniperl("no dynamic loading on miniperl, no Encode");
}
my $DEBUG = 0; # Outputs extra information for debugging this .t
diff --git a/t/re/reg_nc_tie.t b/t/re/reg_nc_tie.t
index b2c49ca7a8..3380b257e2 100644
--- a/t/re/reg_nc_tie.t
+++ b/t/re/reg_nc_tie.t
@@ -4,6 +4,7 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
+ skip_all_if_miniperl("no dynamic loading on miniperl, no Tie::Hash::NamedCapture");
}
# Do a basic test on all the tied methods of Tie::Hash::NamedCapture
diff --git a/t/test.pl b/t/test.pl
index 5c2ac08006..1cadd15713 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -110,6 +110,10 @@ sub skip_all {
exit(0);
}
+sub skip_all_if_miniperl {
+ skip_all(@_) if !defined &DynaLoader::boot_DynaLoader;
+}
+
sub _ok {
my ($pass, $where, $name, @mess) = @_;
# Do not try to microoptimize by factoring out the "not ".