Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rewrite tests to use cpanfile

  • Loading branch information...
commit 5a4c461893985aef7de87c079c545c77965fb4a7 1 parent 76204cc
@miyagawa miyagawa authored
Showing with 19 additions and 13 deletions.
  1. +2 −9 xt/cli/check.t
  2. +12 −3 xt/cli/exec.t
  3. +5 −1 xt/cli/mirror.t
View
11 xt/cli/check.t
@@ -5,15 +5,8 @@ use xt::CLI;
{
my $app = cli();
- $app->dir->touch("Makefile.PL", <<EOF);
-use ExtUtils::MakeMaker;
-WriteMakefile(
- NAME => "foo",
- VERSION => 1,
- PREREQ_PM => {
- "Try::Tiny" => 0,
- },
-);
+ $app->dir->touch("cpanfile", <<EOF);
+requires 'Try::Tiny';
EOF
$app->run("check");
View
15 xt/cli/exec.t
@@ -8,13 +8,22 @@ use xt::CLI;
$app->run("exec", "--system", "--", "perl", "-e", "use Try::Tiny");
like $app->system_error, qr/Can't locate Try\/Tiny.pm/;
- $app->run("install", "Try::Tiny");
+ $app->dir->touch("cpanfile", <<EOF);
+requires 'Try::Tiny';
+EOF
+
+ $app->run("install");
$app->run("exec", "--system", "--", "perl", "-e", 'use Try::Tiny; print "OK\n"');
like $app->system_output, qr/OK/;
- $app->run("install", "Mojolicious");
- $app->run("exec", "--system", "--", "mojolicious", "version");
+ $app->dir->touch("cpanfile", <<EOF);
+requires 'Try::Tiny';
+requires 'Mojolicious';
+EOF
+
+ $app->run("install");
+ $app->run("exec", "--system", "--", "mojo", "version");
like $app->system_output, qr/Mojolicious/;
}
View
6 xt/cli/mirror.t
@@ -8,8 +8,12 @@ my $cwd = Cwd::cwd();
{
my $app = cli();
+ $app->dir->touch("cpanfile", <<EOF);
+requires 'Hash::MultiValue';
+EOF
+
$app->carton->{mirror} = "$cwd/xt/mirror";
- $app->run("install", "Hash::MultiValue");
+ $app->run("install");
$app->run("list");
is $app->output, "Hash-MultiValue-0.08\n";
Please sign in to comment.
Something went wrong with that request. Please try again.