File: 01.create_distro.t

package info (click to toggle)
libmodule-starter-smart-perl 0.0.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 108 kB
  • sloc: perl: 224; makefile: 2
file content (51 lines) | stat: -rw-r--r-- 1,245 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use Test::More tests => 5;
use Test::TempDir::Tiny;
use Module::Starter qw/Module::Starter::Smart/;
use File::Spec;

my $tempdir = tempdir();
my $root = File::Spec->catdir($tempdir, 'Modern-Mo');

{
    local $SIG{__WARN__} = sub {
        warn $_[0] unless $_[0] =~ /^Added to MANIFEST/;
    };

    Module::Starter->create_distro(
	author   => 'me',
        builder  => 'ExtUtils::MakeMaker',
        modules  => ['Modern::Mo'],
        email    => 'me@there.com',
        dir      => $root,
    );
}

ok(-d $root, 'Module root exists');

my $file = File::Spec->catfile($root, qw(lib Modern Mo.pm));
ok(-f $file, 'Module file exists');

push @INC, File::Spec->catdir($root, 'lib');
require_ok('Modern::Mo');

{
    local $SIG{__WARN__} = sub {
        warn $_[0] unless $_[0] =~ /^Added to MANIFEST/;
    };

    Module::Starter->create_distro(
	author   => 'me',
        builder  => 'ExtUtils::MakeMaker',
        modules  => ['Modern::Mumu'],
        email    => 'me@there.com',
        dir      => $root,
    );
}

# ok(-d $root, 'Module root exists');

my $file = File::Spec->catfile($root, qw(lib Modern Mumu.pm));
ok(-f $file, 'Additional module file exists');

# push @INC, File::Spec->catdir($root, 'lib');
require_ok('Modern::Mumu');