Skip to content

Commit

Permalink
Move the test for Win32's FindExt.pm to t/porting, and run it automat…
Browse files Browse the repository at this point in the history
…ically.

The test was written as part of the work on migrating modules to cpan/ and
dist/, but at that time at least one of FindExt.pm and Configure was buggy with
the classification of at least one module (XS or non-XS). As that is now fixed,
move the test to t/porting, and run it routinely. This will ensure that the
Win32 code's classification of modules will remain consistent with Configure's.
  • Loading branch information
nwc10 committed Nov 21, 2010
1 parent 27a1175 commit 0724ad8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -4790,6 +4790,7 @@ t/porting/checkcase.t Check whether we are case-insensitive-fs-friendly
t/porting/diag.t Test completeness of perldiag.pod
t/porting/dual-life.t Check that dual-life bins are in utils/
t/porting/exec-bit.t Check that exec-bit bins are identified
t/porting/FindExt.t Test win32/FindExt.pm
t/porting/maintainers.t Test that Porting/Maintaners.pl is up to date
t/porting/manifest.t Test that this MANIFEST file is well formed
t/porting/podcheck.t Test the POD of shipped modules is well formed
Expand Down Expand Up @@ -4988,7 +4989,6 @@ win32/create_perllibst_h.pl creates perllibst.h file for inclusion from perllib.
win32/distclean.bat Remove _ALL_ files not listed here in MANIFEST
win32/fcrypt.c crypt() implementation
win32/FindExt.pm Scan for extensions
win32/FindExt.t Test FindExt.pm
win32/genmk95.pl Perl code to generate command.com-usable makefile.95
win32/include/arpa/inet.h Win32 port
win32/include/dirent.h Win32 port
Expand Down
12 changes: 10 additions & 2 deletions win32/FindExt.t → t/porting/FindExt.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@

BEGIN {
@INC = qw(../win32 ../lib);
require './test.pl';
}
use strict;

use Test::More tests => 10;
# 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.

plan tests => 10;
use FindExt;
use Config;

FindExt::scan_ext('../cpan');
FindExt::scan_ext('../dist');
FindExt::scan_ext('../ext');

# Config.pm and FindExt.pm make different choices about what should be built
Expand Down Expand Up @@ -39,5 +47,5 @@ foreach (['static_ext',
my @config = sort split ' ', $config;
is (scalar @$found, scalar @config,
"We find the same number of $type");
is_deeply($found, \@config, "We find the same");
is ("@$found", "@config", "We find the same list of $type");
}

0 comments on commit 0724ad8

Please sign in to comment.