summaryrefslogtreecommitdiff
path: root/ext/DynaLoader
diff options
context:
space:
mode:
authorPeter Martini <PeterCMartini@GMail.com>2014-08-19 21:23:39 -0400
committerPeter Martini <PeterCMartini@GMail.com>2014-08-19 22:00:49 -0400
commit11d55ae189b0816fc5b6764b74cd09ee6704bcbb (patch)
treecc9da6803bd7c4effd23a399e6dda7490d172547 /ext/DynaLoader
parentad81d09f91f86467273aeb1e8bc31ea2a0537f36 (diff)
downloadperl-11d55ae189b0816fc5b6764b74cd09ee6704bcbb.tar.gz
Revert Test::Builder changes in prep for 5.21.3
This reverts commit 6bdb88770f849c47b5c09e733ac460ce3e9dbc97 and commit 59c96aebdd56baf5d1979103046b1c6d4e308aa2, which are causing the test suite to run much slower and which are failing on some platforms. http://nntp.perl.org/group/perl.perl5.porters/218678 has further details, with RT 122538 being the ticket number.
Diffstat (limited to 'ext/DynaLoader')
-rw-r--r--ext/DynaLoader/t/DynaLoader.t16
1 files changed, 4 insertions, 12 deletions
diff --git a/ext/DynaLoader/t/DynaLoader.t b/ext/DynaLoader/t/DynaLoader.t
index caf2e507f9..ade1f8e52b 100644
--- a/ext/DynaLoader/t/DynaLoader.t
+++ b/ext/DynaLoader/t/DynaLoader.t
@@ -3,7 +3,7 @@
use strict;
use Config;
use Test::More;
-my (%modules, %no_unload);
+my %modules;
my $db_file;
BEGIN {
@@ -24,16 +24,10 @@ BEGIN {
$db_file => q| ::is( ref $db_file->can('TIEHASH'), 'CODE' ) |, # 5.0
'Socket' => q| ::is( ref Socket->can('inet_aton'),'CODE' ) |, # 5.0
'Time::HiRes'=> q| ::is( ref Time::HiRes->can('usleep'),'CODE' ) |, # 5.7.3
- 'B' => q| ::is( ref B->can('svref_2object'),'CODE' ) |, # Test::Builder loads this.
- 'Encode' => q| ::is( ref Encode->can('decode'),'CODE' ) |, # Test::Builder loads this.
);
-# These modules must not be unloaded since they are needed by Test::Builder
-%no_unload = (
- 'B' => 1,
- 'Encode' => 1,
- 'List::Util' => 1,
-);
+plan tests => 26 + keys(%modules) * 3;
+
# Try to load the module
use_ok( 'DynaLoader' );
@@ -143,6 +137,7 @@ for my $module (sort keys %modules) {
}
}
+# checking internal consistency
is( scalar @DynaLoader::dl_librefs, scalar keys %modules, "checking number of items in \@dl_librefs" );
is( scalar @DynaLoader::dl_modules, scalar keys %modules, "checking number of items in \@dl_modules" );
@@ -155,7 +150,6 @@ for my $libref (reverse @DynaLoader::dl_librefs) {
skip "unloading unsupported on $^O", 2
if ($old_darwin || $^O eq 'VMS');
my $module = pop @loaded_modules;
- next if $no_unload{$module};
skip "File::Glob sets PL_opfreehook", 2 if $module eq 'File::Glob';
my $r = eval { DynaLoader::dl_unload_file($libref) };
is( $@, '', "calling dl_unload_file() for $module" );
@@ -192,5 +186,3 @@ SKIP: {
"mod2fname + libname_unique correctly truncates long names"
);
}
-
-done_testing;