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) $
8 ##############################################################################
14 use English qw<-no_match_vars>;
16 use Perl::Critic::UserProfile;
17 use Perl::Critic::PolicyFactory (-test => 1);
18 use Perl::Critic::ThemeListing;
20 use Test::More tests => 1;
22 #-----------------------------------------------------------------------------
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 );
30 my $expected = <<'END_EXPECTED';
45 my $listing_as_string = "$listing";
46 is( $listing_as_string, $expected, 'Theme list matched.' );
48 #-----------------------------------------------------------------------------
50 # ensure we run true if this test is loaded by
51 # t/12_themelisting.t_without_optional_dependencies.t
54 #-----------------------------------------------------------------------------
57 # cperl-indent-level: 4
59 # indent-tabs-mode: nil
60 # c-indentation-style: bsd
62 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :