4 use Test::More tests => 3;
6 use ExtUtils::ParseXS::Utilities qw(
7 standard_typemap_locations
12 my @stl = standard_typemap_locations( \@INC );
13 ok( @stl >= 9, "At least 9 entries in typemap locations list" );
14 is( $stl[$#stl], 'typemap',
15 "Last element is typemap in current directory");
17 skip "No lib/ExtUtils/ directories under directories in \@INC",
21 # We check only as many location entries from the start of the array
22 # (where the @INC-related entries are) as there are entries from @INC.
23 # We manage to do that by stopping when we find the "updir" related
24 # entries, which we assume is never contained in a default @INC entry.
25 my $updir = File::Spec->updir;
27 $max = $#stl if $#stl < $max;
28 foreach my $i (0.. $max) {
29 $max = $i, last if $stl[$i] =~ /\Q$updir\E/;
33 ( 0 < (grep -f $_, @stl[0..$max]) ),
34 "At least one typemap file exists underneath \@INC directories"