diff options
Diffstat (limited to 'xt/cli/mirror.t')
-rw-r--r-- | xt/cli/mirror.t | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/xt/cli/mirror.t b/xt/cli/mirror.t new file mode 100644 index 0000000..5ab9a29 --- /dev/null +++ b/xt/cli/mirror.t @@ -0,0 +1,38 @@ +use strict; +use Test::More; +use xt::CLI; + +my $cwd = Path::Tiny->cwd; + +{ + my $app = cli(); + + $app->write_cpanfile(<<EOF); +requires 'Hash::MultiValue'; +EOF + + local $ENV{PERL_CARTON_MIRROR} = "$cwd/xt/mirror"; + $app->run("install"); + + $app->run("list"); + like $app->stdout, qr/^Hash-MultiValue-0.08/m; +} + +{ + # fallback to CPAN + my $app = cli(); + $app->write_cpanfile(<<EOF); +requires 'PSGI'; +EOF + + local $ENV{PERL_CARTON_MIRROR} = "$cwd/xt/mirror"; + $app->run("install"); + + $app->run("list"); + like $app->stdout, qr/^PSGI-/m; +} + +done_testing; + + + |