From 94044478ca5675ea5985fc4140989150b180b8aa Mon Sep 17 00:00:00 2001 From: Tatsuhiko Miyagawa Date: Thu, 6 Jun 2013 10:29:01 +0900 Subject: use subtest --- xt/cli/check.t | 19 ++++++++++++++----- 1 file 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(<run("check"); like $app->stderr, qr/find carton\.lock/; +}; + +subtest 'carton install and check' => sub { + my $app = cli(); + $app->write_cpanfile(<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; -- cgit v1.2.1