File: dist.t

package info (click to toggle)
carton 1.0.35-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 448 kB
  • sloc: perl: 1,207; makefile: 7
file content (24 lines) | stat: -rw-r--r-- 554 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
use strict;
use Test::More;
use lib ".";
use xt::CLI;

subtest 'with pinned dist' => sub {
    my $app = cli();
    $app->write_file('cpanfile', <<EOF);
requires 'Try::Tiny', '0.29',
  dist => 'ETHER/Try-Tiny-0.29.tar.gz';
EOF
    $app->run("install");

    $app->run("list");
    like $app->stdout, qr/Try-Tiny-0\.29/;

    $app->run("exec", "perl", "-e", "use Try::Tiny\ 1");
    like $app->stderr, qr/Try::Tiny .* 0\.29/;

    my $content = $app->dir->child('cpanfile.snapshot')->slurp;
    like $content, qr/ETHER\/Try-Tiny-0\.29/;
};

done_testing;