File: 04_extra_libs.t

package info (click to toggle)
libextutils-depends-perl 0.8002-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 140 kB
  • sloc: perl: 359; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 904 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use strict;
use warnings;

use Test::More;

use FindBin;
use lib "$FindBin::Bin/lib";
use TestHelper;

use ExtUtils::Depends;

my $tmp_inc = temp_inc;

plan skip_all => "test only for 'MSWin32', 'cygwin', and 'android'"
  unless $^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'android';

my $dep_info = ExtUtils::Depends->new('DepTest');
$dep_info->save_config(catfile $tmp_inc, qw(DepTest Install Files.pm));

# --------------------------------------------------------------------------- #

push @INC, catdir(qw(t inc));
my $use_info = ExtUtils::Depends->new('UseTest', 'DepTest');
my %vars = $use_info->get_makefile_vars;

my $libname = 'DepTest';

require DynaLoader;
$libname = DynaLoader::mod2fname([$libname]) if defined &DynaLoader::mod2fname;

like $vars{LDFROM}, qr/$libname/ or diag explain \%vars;

# --------------------------------------------------------------------------- #

done_testing;