This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Thanks to FindExt::apply_config() we're now able to test dynamic extensions.
authorNicholas Clark <nick@ccl4.org>
Wed, 5 Jun 2013 19:19:12 +0000 (21:19 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 2 Jul 2013 13:33:27 +0000 (15:33 +0200)
FindExt::apply_config() mimic's Configure's logic, which means that FindExt's
idea of which extensions should be built is consistent with Configure's.

t/porting/FindExt.t

index 165ae14..a20acf0 100644 (file)
@@ -11,9 +11,6 @@ use Config;
 
 # Test that Win32/FindExt.pm is consistent with Configure in determining the
 # types of extensions.
-# It's not possible to check the list of built dynamic extensions, as that
-# varies based on which headers are present, and which options ./Configure was
-# invoked with.
 
 if ($^O eq "MSWin32" && !defined $ENV{PERL_STATIC_EXT}) {
     skip_all "PERL_STATIC_EXT must be set to the list of static extensions";
@@ -23,7 +20,7 @@ unless (defined $Config{usedl}) {
     skip_all "FindExt just plain broken for static perl.";
 }
 
-plan tests => 10;
+plan tests => 12;
 use FindExt;
 
 FindExt::apply_config(\%Config);
@@ -45,7 +42,9 @@ my @found_built;
 @config_built = sort @config_built;
 @found_built = sort @found_built;
 
-foreach (['static_ext',
+foreach (['dynamic_ext',
+          [FindExt::dynamic_ext()], $Config{dynamic_ext}],
+         ['static_ext',
          [FindExt::static_ext()], $Config{static_ext}],
         ['nonxs_ext',
          [FindExt::nonxs_ext()], $Config{nonxs_ext}],
@@ -62,3 +61,10 @@ foreach (['static_ext',
        "We find the same number of $type");
     is ("@$found", "@config", "We find the same list of $type");
 }
+
+# Local variables:
+# cperl-indent-level: 4
+# indent-tabs-mode: nil
+# End:
+#
+# ex: set ts=8 sts=4 sw=4 et: