Revision history for Perl extension ExtUtils::ParseXS.
+3.02_01 - ...
+
+ - Test fix: Try all @INC-derived typemap locations. (CPAN RT #70047)
+ [Mike Sheldrake]
+
3.02 - Thu Aug 4 18:19:00 CET 2011
- Test fix: Use File::Spec->catfile instead of catdir where appropriate.
skip "No lib/ExtUtils/ directories under directories in \@INC",
1
unless @stl > 9;
- ok( -f $stl[-10],
+
+ # We check only as many location entries from the start of the array
+ # (where the @INC-related entries are) as there are entries from @INC.
+ # We manage to do that by stopping when we find the "updir" related
+ # entries, which we assume is never contained in a default @INC entry.
+ my $max = $#INC;
+ $max = $#stl if $#stl < $max;
+ foreach my $i (0.. $max) {
+ $max = $i, last if $stl[$i] =~ /\Q$updir\E/;
+ }
+
+ my $updir = File::Spec->updir;
+ ok(
+ ( 0 < (grep -f $_, @stl[0..$max]) ),
"At least one typemap file exists underneath \@INC directories"
);
}