summaryrefslogtreecommitdiff
path: root/xt/cli/deps_phase.t
blob: 862dc76c1c8442a3feec2aefbe6437a09729eb86 (plain)
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
use strict;
use Test::More;
use xt::CLI;

{
    my $app = cli();

    $app->write_cpanfile(<<EOF);
on test => sub {
    requires 'Test::NoWarnings';
    recommends 'Test::Pretty';
};
on develop => sub {
    requires 'Path::Tiny';
};
EOF

    $app->run("install");

    $app->run("list");
    like $app->stdout, qr/Test-NoWarnings/;
    like $app->stdout, qr/Path-Tiny/;
    unlike $app->stdout, qr/Test-Pretty/;
}

done_testing;