Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / t / 12_themelisting.t
1 #!perl
2
3 ##############################################################################
4 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/12_themelisting.t $
5 #     $Date: 2008-06-06 00:48:04 -0500 (Fri, 06 Jun 2008) $
6 #   $Author: clonezone $
7 # $Revision: 2416 $
8 ##############################################################################
9
10 use 5.006001;
11 use strict;
12 use warnings;
13
14 use English qw<-no_match_vars>;
15
16 use Perl::Critic::UserProfile;
17 use Perl::Critic::PolicyFactory (-test => 1);
18 use Perl::Critic::ThemeListing;
19
20 use Test::More tests => 1;
21
22 #-----------------------------------------------------------------------------
23
24 my $profile = Perl::Critic::UserProfile->new( -profile => 'NONE' );
25 my @policy_names = Perl::Critic::PolicyFactory::site_policy_names();
26 my $factory = Perl::Critic::PolicyFactory->new( -profile => $profile );
27 my @policies = map { $factory->create_policy( -name => $_ ) } @policy_names;
28 my $listing = Perl::Critic::ThemeListing->new( -policies => \@policies );
29
30 my $expected = <<'END_EXPECTED';
31 bugs
32 complexity
33 core
34 cosmetic
35 maintenance
36 pbp
37 performance
38 portability
39 readability
40 security
41 tests
42 unicode
43 END_EXPECTED
44
45 my $listing_as_string = "$listing";
46 is( $listing_as_string, $expected, 'Theme list matched.' );
47
48 #-----------------------------------------------------------------------------
49
50 # ensure we run true if this test is loaded by
51 # t/12_themelisting.t_without_optional_dependencies.t
52 1;
53
54 #-----------------------------------------------------------------------------
55 # Local Variables:
56 #   mode: cperl
57 #   cperl-indent-level: 4
58 #   fill-column: 78
59 #   indent-tabs-mode: nil
60 #   c-indentation-style: bsd
61 # End:
62 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :