diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-15 19:21:51 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-15 19:21:51 +0000 |
commit | e31f9059a9f3918f12c40d4d66f2db885d6f914a (patch) | |
tree | e87f850b34f4bafba1f735ed2162a0d7cba5a635 /xt/cli/mirror.t | |
download | Carton-tarball-master.tar.gz |
Carton-v1.0.21HEADCarton-v1.0.21master
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; + + + |