This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[PATCHES] various small Math::BigInt et. al. fixes
[perl5.git] / lib / h2xs.t
index 2a5e14b..380f838 100644 (file)
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
+    # FIXME (or rather FIXh2xs)
+    require Config;
+    if (($Config::Config{'extensions'} !~ m!\bDevel/PPPort\b!) ){
+       print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+       exit 0;
+    }
 }
 
 # use strict; # we are not really testing this
@@ -50,6 +56,10 @@ if ($^O eq 'MacOS') {
 my $name = 'h2xst';
 my $header = "$name.h";
 my $thisversion = sprintf "%vd", $^V;
+$thisversion =~ s/^v//;
+
+# If this test has failed previously a copy may be left.
+rmtree($name);
 
 my @tests = (
 "-f -n $name", $], <<"EOXSFILES",
@@ -117,7 +127,7 @@ Writing $name/Changes
 Writing $name/MANIFEST
 EONOXSFILES
 
-"-f -n $name $header -b $thisversion", $], <<"EOXSFILES",
+"-f -n $name -b $thisversion $header", $], <<"EOXSFILES",
 Writing $name/ppport.h
 Writing $name/lib/$name.pm
 Writing $name/$name.xs