File: makefile-pl.t

package info (click to toggle)
libmodule-faker-perl 0.027-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 340 kB
  • sloc: perl: 1,231; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 659 bytes parent folder | download | duplicates (5)
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
use strict;
use warnings;

use Test::More;

use Module::Faker::Dist;
use File::Temp ();
use Path::Class;

my @matches = (

  [ qr/^ \s* NAME \s* => \s* "Provides::Inner::Sorted", \s* $/mx,
    'Makefile.PL gets NAME that looks like a package' ],

);

plan tests => 2 + @matches;

my $MFD = 'Module::Faker::Dist';

my $tmpdir = File::Temp::tempdir(CLEANUP => 1);

my $dist = $MFD->from_file('./eg/Provides-Inner-Sorted.yml');

isa_ok($dist, $MFD);

my $dir = $dist->make_dist_dir({ dir => $tmpdir });

my $path = file($dir, 'Makefile.PL');
ok -e $path;

my $content = $path->slurp;

foreach my $match ( @matches ){
  like $content, $match->[0], $match->[1];
}