[carton] 160/472: Rewrite tests to use cpanfile
Lucas Kanashiro
kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:38:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
kanashiro-guest pushed a commit to branch master
in repository carton.
commit 5a4c461893985aef7de87c079c545c77965fb4a7
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date: Thu Apr 12 21:40:14 2012 +0900
Rewrite tests to use cpanfile
---
xt/cli/check.t | 11 ++---------
xt/cli/exec.t | 15 ++++++++++++---
xt/cli/mirror.t | 6 +++++-
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/xt/cli/check.t b/xt/cli/check.t
index 171a970..0d07dde 100644
--- a/xt/cli/check.t
+++ b/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");
diff --git a/xt/cli/exec.t b/xt/cli/exec.t
index dcdbaf3..ded5914 100644
--- a/xt/cli/exec.t
+++ b/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/;
}
diff --git a/xt/cli/mirror.t b/xt/cli/mirror.t
index 6d9197c..4092197 100644
--- a/xt/cli/mirror.t
+++ b/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";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git
More information about the Pkg-perl-cvs-commits
mailing list