]>
Commit | Line | Data |
---|---|---|
c586eb58 TC |
1 | #!perl -w |
2 | use strict; | |
3 | use Test::More tests => 6; | |
4 | use File::Spec; | |
5 | ||
6 | { # RT 37353 | |
7 | local @INC = @INC; | |
8 | ||
9 | unshift @INC, File::Spec->catdir('blib', 'lib'); | |
10 | unshift @INC, File::Spec->catdir('blib', 'arch'); | |
11 | require Imager::ExtUtils; | |
12 | my $path = Imager::ExtUtils->base_dir; | |
13 | ok(File::Spec->file_name_is_absolute($path), "check dirs absolute") | |
14 | or print "# $path\n"; | |
15 | } | |
16 | ||
17 | { # includes | |
18 | my $includes = Imager::ExtUtils->includes; | |
19 | ok($includes =~ s/^-I//, "has the -I"); | |
20 | ok(-e File::Spec->catfile($includes, "imext.h"), "found a header"); | |
21 | } | |
22 | ||
23 | { # typemap | |
24 | my $typemap = Imager::ExtUtils->typemap; | |
25 | ok($typemap, "got a typemap path"); | |
26 | ok(-f $typemap, "it exists"); | |
27 | open TYPEMAP, "< $typemap"; | |
28 | my $tm_content = do { local $/; <TYPEMAP>; }; | |
29 | close TYPEMAP; | |
30 | cmp_ok($tm_content, '=~', "Imager::Color\\s+T_PTROBJ", | |
31 | "it seems to be the right file"); | |
32 | } |