3 ##############################################################################
4 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/13_bundled_policies.t $
5 # $Date: 2008-06-06 00:48:04 -0500 (Fri, 06 Jun 2008) $
8 ##############################################################################
14 use Test::More (tests => 1);
16 use Perl::Critic::UserProfile;
17 use Perl::Critic::PolicyFactory (-test => 1);
19 # common P::C testing tools
20 use Perl::Critic::TestUtils qw(bundled_policy_names);
21 Perl::Critic::TestUtils::block_perlcriticrc();
23 #-----------------------------------------------------------------------------
25 my $profile = Perl::Critic::UserProfile->new();
26 my $factory = Perl::Critic::PolicyFactory->new( -profile => $profile );
27 my @found_policies = sort map { ref $_ } $factory->create_all_policies();
28 my $test_label = 'successfully loaded policies matches MANIFEST';
29 is_deeply( \@found_policies, [bundled_policy_names()], $test_label );
31 #-----------------------------------------------------------------------------
33 # ensure we run true if this test is loaded by
34 # t/13_bundled_policies.t_without_optional_dependencies.t
37 ##############################################################################
40 # cperl-indent-level: 4
42 # indent-tabs-mode: nil
43 # c-indentation-style: bsd
45 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :