File: archive_builder.t

package info (click to toggle)
libdist-zilla-perl 6.033-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,928 kB
  • sloc: perl: 7,282; makefile: 4; sh: 1
file content (37 lines) | stat: -rw-r--r-- 683 bytes parent folder | download | duplicates (3)
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
use strict;
use warnings;
use Test::More 0.88;
use experimental qw( postderef );

use lib 't/lib';

use Test::DZil;
use JSON::MaybeXS;

my $tzil = Builder->from_config(
  { dist_root => 'corpus/dist/DZT' },
  {
    add_files => {
      'source/dist.ini' => simple_ini(
        'GatherDir',
        'TestArchiveBuilder',
        'TestReleaseProvider',
      ),
    },
  },
);

my $fooball = $tzil->build_archive;

note "fooball = $fooball";
note "is_trial = @{[ $tzil->is_trial ]}";

my @payload = JSON::MaybeXS->new->decode( $fooball->slurp_raw )->@*;

is $payload[0], 'DZT-Sample-0.001-TRIAL';
ok -d $payload[1];
is $payload[2], 'DZT-Sample-0.001';

unlink $fooball;

done_testing;