Debian Codegraph @

xt/author/00-compile.t

raw symbols SCIP
1 use 5.006scip-perl cpan DPKG-Parse 0.03 `5.006`/;
2 use strictscip-perl cpan DPKG-Parse 0.03 strict/;
3 use warningsscip-perl cpan DPKG-Parse 0.03 warnings/;
4
5 # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.053
6
7 use Test::More 0.94scip-perl cpan DPKG-Parse 0.03 Test/`More 0.94`/;
8
9 planscip-perl cpan DPKG-Parse 0.03 main/plan(). tests => 6;
10
11 my @module_files = (
12 'DPKG/Parse.pm',
13 'DPKG/Parse/Available.pm',
14 'DPKG/Parse/Entry.pm',
15 'DPKG/Parse/Packages.pm',
16 'DPKG/Parse/Status.pm'
17 );
18
19
20
21 # no fake home requested
22
23 my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
24
25 use File::Specscip-perl cpan DPKG-Parse 0.03 File/Spec/;
26 use IPC::Open3scip-perl cpan DPKG-Parse 0.03 IPC/Open3/;
27 use IO::Handlescip-perl cpan DPKG-Parse 0.03 IO/Handle/;
28
29 openscip-perl cpan DPKG-Parse 0.03 main/open(). my $stdin, '<', File::Spec->devnullscip-perl cpan DPKG-Parse 0.03 File/Spec/devnull(). or diescip-perl cpan DPKG-Parse 0.03 main/die(). "can't open devnull: $!";
30
31 my @warnings;
32 for my $lib (@module_files)
33 {
34 # see L<perlfaq8/How can I capture STDERR from an external command?>
35 my $stderr = IO::Handle->newscip-perl cpan DPKG-Parse 0.03 IO/Handle/new().;
36
37 my $pid = open3scip-perl cpan DPKG-Parse 0.03 main/open3().($stdin, '>&STDERR', $stderr, $^Xscip-perl cpan DPKG-Parse 0.03 main/`$^X`., $inc_switch, '-e', "require q[$lib]");
38 binmodescip-perl cpan DPKG-Parse 0.03 main/binmode(). $stderr, ':crlf' if $^Oscip-perl cpan DPKG-Parse 0.03 main/`$^O`. eq 'MSWin32';
39 my @_warnings = <$stderr>;
40 waitpidscip-perl cpan DPKG-Parse 0.03 main/waitpid().($pid, 0);
41 isscip-perl cpan DPKG-Parse 0.03 main/is().($?scip-perl cpan DPKG-Parse 0.03 main/`$?`., 0, "$lib loaded ok");
42
43 diagscip-perl cpan DPKG-Parse 0.03 main/diag(). "### is blib loaded? ", eval { requirescip-perl cpan DPKG-Parse 0.03 main/require(). blib; blib->VERSIONscip-perl cpan DPKG-Parse 0.03 blib/VERSION(). }, "\n";
44 shiftscip-perl cpan DPKG-Parse 0.03 main/shift(). @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
45 and not eval { blib->VERSIONscip-perl cpan DPKG-Parse 0.03 blib/VERSION().('1.01') };
46
47 if (@_warnings)
48 {
49 warnscip-perl cpan DPKG-Parse 0.03 main/warn(). @_warnings;
50 pushscip-perl cpan DPKG-Parse 0.03 main/push(). @warnings, @_warnings;
51 }
52 }
53
54
55
56 isscip-perl cpan DPKG-Parse 0.03 main/is().(scalarscip-perl cpan DPKG-Parse 0.03 main/scalar().(@warnings), 0, 'no warnings found')
57 or diagscip-perl cpan DPKG-Parse 0.03 main/diag(). 'got warnings: ', explainscip-perl cpan DPKG-Parse 0.03 main/explain().(\@warnings);
58
59 BAIL_OUTscip-perl cpan DPKG-Parse 0.03 main/BAIL_OUT().("Compilation problems") if !Test::More->builderscip-perl cpan DPKG-Parse 0.03 Test/More/builder().->is_passingscip-perl cpan DPKG-Parse 0.03 main/is_passing().;