Author: jkeenan
Date: Mon Apr 23 12:58:34 2007
New Revision: 18309
Modified:
trunk/t/tools/pmc2cutils/00-qualify.t
Log:
Per discussion with Jonathan W. on list Apr 23 2007, allow for the possibility
that in src/pmc/ there may be .h files *provided that* they are not 'pmc_*.h'
files (in which case they would be left over from a previous build).
Modified: trunk/t/tools/pmc2cutils/00-qualify.t
==============================================================================
--- trunk/t/tools/pmc2cutils/00-qualify.t (original)
+++ trunk/t/tools/pmc2cutils/00-qualify.t Mon Apr 23 12:58:34 2007
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More tests => 10;
use FindBin;
use lib ( "$FindBin::Bin/../..", "$FindBin::Bin/../../lib",
"$FindBin::Bin/../../../lib", );
use_ok('Parrot::Pmc2c::Utils');
@@ -23,9 +23,25 @@
}
}
-is( scalar( keys %sfx ), 2, "only 2 file suffixes in src/pmc" );
+# In src/pmc, we should have only .pmc files (81+ of them), 1 .num file,
+# and >= .h files none of whose names may begin 'pmc_' (lest they be left over
+# from a previous build).
+my $suffixqty = scalar(keys %sfx);
+ok( ((2 <= $suffixqty) and ($suffixqty <= 3)),
+ "only 2 or 3 file suffixes in src/pmc");
+
ok( $sfx{'num'}, ".num suffix correctly located" );
ok( $sfx{'pmc'}, ".pmc suffix correctly located" );
+if( $sfx{'h'}) {
+ my $pmc_leftovers = 0;
+ foreach my $f (@files) {
+ $pmc_leftovers++ if $f =~ m/^pmc_.*\.h$/;
+ }
+ is($pmc_leftovers, 0,
+ "No left-over 'pmc_*.h' files in src/pmc/");
+} else {
+ pass("No .h files in src/pmc/");
+}
my $message = <<END_OF_MESSAGE;