[carton] 228/472: Added more tests for exec with no --, as well as versioning tests with -M

Lucas Kanashiro kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:38:49 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 3117d4a524626636b02414c8c156f432a18b9b10
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date:   Fri May 31 10:10:37 2013 +0900

    Added more tests for exec with no --, as well as versioning tests with -M
---
 xt/cli/exec.t | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/xt/cli/exec.t b/xt/cli/exec.t
index 186ad92..44d6243 100644
--- a/xt/cli/exec.t
+++ b/xt/cli/exec.t
@@ -9,23 +9,32 @@ use xt::CLI;
     like $app->system_error, qr/Can't locate Try\/Tiny.pm/;
 
     $app->dir->touch("cpanfile", <<EOF);
-requires 'Try::Tiny';
+requires 'Try::Tiny', '== 0.11';
 EOF
 
     $app->run("install");
-    $app->run("exec", "--", "perl", "-e", 'use Try::Tiny; print "OK\n"');
 
-    like $app->system_output, qr/OK/;
+    $app->run("exec", "--", "perl", "-e", 'use Try::Tiny; print $Try::Tiny::VERSION, "\n"');
+    like $app->system_output, qr/0\.11/;
+
+    $app->run("exec", "perl", "-e", 'use Try::Tiny; print $Try::Tiny::VERSION, "\n"');
+    like $app->system_output, qr/0\.11/, "No need for -- as well";
+
+ TODO: {
+        local $TODO = "Because of PERL5OPT loading order";
+        $app->run("exec", "perl", "-MTry::Tiny", "-e", 'print $Try::Tiny::VERSION, "\n"');
+        like $app->system_output, qr/0\.11/;
+    }
 
     $app->dir->touch("cpanfile", <<EOF);
 requires 'Try::Tiny';
-requires 'Mojolicious';
+requires 'Mojolicious', '== 4.01';
 EOF
 
     $app->run("install");
     $app->run("exec", "--", "mojo", "version");
 
-    like $app->system_output, qr/Mojolicious/;
+    like $app->system_output, qr/Mojolicious \(4\.01/;
 }
 
 done_testing;

-- 
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