#!perl
##############################################################################
# $Date: 2009-07-21 08:50:56 -0700 (Tue, 21 Jul 2009) $
# $Author: clonezone $
# $Revision: 3404 $
##############################################################################
use
5.006001;
use
strict;
use
warnings;
# common P::C testing tools
#-----------------------------------------------------------------------------
our
$VERSION
=
'1.101_001'
;
#-----------------------------------------------------------------------------
Perl::Critic::TestUtils::block_perlcriticrc();
# This is in addition to the regular .run file.
my
$policy
=
'Modules::ProhibitEvilModules'
;
my
$code
=
<<'END_PERL';
use Evil::Module qw(bad stuff);
use Super::Evil::Module;
END_PERL
my
$result
=
eval
{ pcritique(
$policy
, \
$code
); 1; };
ok(
!
$result
,
"$policy does not run if there are no evil modules configured."
,
);
#-----------------------------------------------------------------------------
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 78
# indent-tabs-mode: nil
# c-indentation-style: bsd
# End:
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :