From: Marcus Ramberg Date: Thu, 9 Dec 2004 10:10:09 +0000 (+0000) Subject: only skip two tests if captureoutput is missing X-Git-Tag: 2.10~51 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=b1d78352f8dc3f27b8ddda28d638ba3e80d2abf5;p=maypole.git only skip two tests if captureoutput is missing skip all apache_mvc tests if missing mod_perl git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@313 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/t/apache_mvc.t b/t/apache_mvc.t index e656128..9a3eafd 100644 --- a/t/apache_mvc.t +++ b/t/apache_mvc.t @@ -1,7 +1,10 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 10; - +use Test::More; +BEGIN { if (eval { require mod_perl }) { + plan tests => 2; + } else { Test::More->import(skip_all =>"mod_perl is not installed: $@") } + } require_ok('Apache::MVC'); ok($Apache::MVC::VERSION, 'defines $VERSION'); # defines $VERSION diff --git a/t/cgi_maypole.t b/t/cgi_maypole.t index d8a5ccf..977201a 100644 --- a/t/cgi_maypole.t +++ b/t/cgi_maypole.t @@ -86,7 +86,7 @@ is_deeply($r->params, $r->query, '... query and params are identical'); can_ok($r => 'send_output'); SKIP: { eval "require IO::CaptureOutput"; - skip "IO::CaptureOutput not installed", 3 if $@; + skip "IO::CaptureOutput not installed", 2 if $@; $r->content_type('text/plain'); $r->document_encoding('iso8859-1'); $r->output('Hello World!');