File: 06-try_built_nofallback-pass3.t

package info (click to toggle)
libdist-zilla-plugin-bootstrap-lib-perl 1.001002-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 304 kB
  • sloc: perl: 227; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 898 bytes parent folder | download | duplicates (2)
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 tests => 1;
use Test::DZil qw( simple_ini Builder );
require Dist::Zilla::Plugin::Bootstrap::lib;

my $files = {};
$files->{'source/dist.ini'} = simple_ini(
  { name => 'E' },
  [ 'Bootstrap::lib', { try_built => 1, fallback => 0, try_built_method => 'parseversion' } ],    #
  ['=E'],
);
$files->{'source/lib/E.pm'} = <<'EOF';
use strict;
use warnings;
package E;

sub register_component {}

1;
EOF
$files->{'source/E-0.1/lib/E.pm'} = $files->{'source/lib/E.pm'};
$files->{'source/E-0.2/lib/E.pm'} = $files->{'source/lib/E.pm'};
$files->{'source/E-0.1/dist.ini'} = $files->{'source/dist.ini'};
$files->{'source/E-0.2/dist.ini'} = $files->{'source/dist.ini'};

my $test =
  Builder->from_config( { dist_root => 'invalid' }, { add_files => $files } );
$test->chrome->logger->set_debug(1);
$test->build;

pass("build ok");

note explain $test->log_messages;