diff options
-rw-r--r-- | xt/cli/check.t | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/xt/cli/check.t b/xt/cli/check.t index 59805e0..1648647 100644 --- a/xt/cli/check.t +++ b/xt/cli/check.t @@ -2,15 +2,21 @@ use strict; use Test::More; use xt::CLI; -{ +subtest 'carton check fails when there is no lock' => sub { my $app = cli(); - $app->write_cpanfile(<<EOF); requires 'Try::Tiny', '== 0.11'; EOF $app->run("check"); like $app->stderr, qr/find carton\.lock/; +}; + +subtest 'carton install and check' => sub { + my $app = cli(); + $app->write_cpanfile(<<EOF); +requires 'Try::Tiny', '== 0.11'; +EOF $app->run("install"); @@ -27,7 +33,11 @@ EOF $app->run("check"); like $app->stdout, qr/not satisfied/; - # TODO run exec and it will fail again + TODO: { + local $TODO = 'exec does not verify lock'; + $app->run("exec", "perl", "use Try::Tiny"); + like $app->stderr, qr/lock/; + } $app->run("install"); @@ -49,8 +59,7 @@ EOF $app->run("check"); like $app->stdout, qr/not satisfied/; -} - +}; done_testing; |