This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make minitest pass (must skip if no dynaloading)
authorNicholas Clark <nick@ccl4.org>
Thu, 9 Jun 2005 08:59:21 +0000 (08:59 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 9 Jun 2005 08:59:21 +0000 (08:59 +0000)
p4raw-id: //depot/perl@24773

t/op/goto_xs.t

index b775e3d..2c95139 100755 (executable)
@@ -9,17 +9,20 @@
 #       guessing that if all of these work correctly, the bad ones will
 #       break correctly as well.
 
-chdir 't' if -d 't';
-@INC = '../lib';
-$ENV{PERL5LIB} = "../lib";
+BEGIN { $| = 1; }
+BEGIN {
+    chdir 't' if -d 't';
+    @INC = '../lib';
+    $ENV{PERL5LIB} = "../lib";
 
 # turn warnings into fatal errors
-$SIG{__WARN__} = sub { die "WARNING: @_" } ;
-
-BEGIN { $| = 1; }
-eval 'require Fcntl'
-  or do { print "1..0\n# Fcntl unavailable, can't test XS goto.\n"; exit 0 };
+    $SIG{__WARN__} = sub { die "WARNING: @_" } ;
 
+    foreach (qw(Fcntl XS::APItest)) {
+       eval "require $_"
+       or do { print "1..0\n# $_ unavailable, can't test XS goto.\n"; exit 0 }
+    }
+}
 print "1..11\n";
 
 # We don't know what symbols are defined in platform X's system headers.