Acme-ChuckNorris

 view release on metacpan or  search on metacpan

t/00.load.t  view on Meta::CPAN


my $chuck = round_house_kick_to_the_perl( \q{print "Ka POW"} );
if ( exists $ENV{'ROUND_HOUSE_KICK_TO_STDOUT'} && $ENV{'ROUND_HOUSE_KICK_TO_STDOUT'} ) {
    diag($chuck);
}
else {
    diag("Set \$ENV{'ROUND_HOUSE_KICK_TO_STDOUT'} to make this test really awesome!");
}

SKIP: {
    if ( eval 'require Test::Output; 1' ) {
        Test::Output::stdout_is( sub { eval round_house_kick_to_the_perl( \q{print "Ka POW"} ) }, "Ka POW", 'basic round_house_kick_to_the_perl()' );
        Test::Output::stdout_is( sub { eval round_house_kick_to_the_text( \q{Howdy} ) },          "Howdy",  'basic round_house_kick_to_the_text()' );
    }
    else {
        skip 'Please install Test::Output to run these tests', 2;
    }
}

my $codenorris = round_house_kick_to_the_perl( \q{print "Ka POW"}, 'Regex' => 0 );
my $_chuck = $chuck;
$_chuck =~ s/use\s+re\s+.eval.//;        # hack to allow this test to work in v5.18
$codenorris =~ s/use\s+re\s+.eval.//;    # hack to allow this test to work in v5.18
ok( $_chuck !~ m/eval/ && $codenorris =~ m/eval/, 'allowed arg override works' );
ok( round_house_kick_to_the_text( \q{Howdy}, 'Print' => 0 ), 'disallowed arg override has no effect' );

t/perlcritic.t  view on Meta::CPAN

#!perl

use Test::More;
plan skip_all => 'Critic tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};

eval 'use Test::Perl::Critic';
plan skip_all => 'Test::Perl::Critic required for testing PBP compliance' if $@;
Test::Perl::Critic::all_critic_ok();

t/perltidy.t  view on Meta::CPAN

#!perl

use Test::More;
plan skip_all => 'PerlTidy tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};

eval 'use Test::PerlTidy';
plan skip_all => 'Test::PerlTidy required for testing PerlTidy-ness' if $@;
Test::PerlTidy::run_tests();

t/pkg-changes.t  view on Meta::CPAN

#!perl

use Test::More;
plan skip_all => 'pkg/Changes tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};

eval 'use Test::CPAN::Changes 0.23';
plan skip_all => 'Test::CPAN::Changes 0.23 required for testing the pkg/Changes file' if $@;

changes_ok();    # this does the plan

t/pkg-readme.t  view on Meta::CPAN

#!perl

use Test::More;
plan skip_all => 'pkg/README tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};

eval 'use Test::CPAN::README';
plan skip_all => 'Test::CPAN::README required for testing the pkg/README file' if $@;

readme_ok('Acme::ChuckNorris');    # this does the plan

t/pod-coverage.t  view on Meta::CPAN

#!perl

use Test::More;
plan skip_all => 'POD tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};

eval 'use Test::Pod::Coverage 1.04';
plan skip_all => 'Test::Pod::Coverage v1.04 required for testing POD coverage' if $@;
all_pod_coverage_ok();

t/pod-encoding.t  view on Meta::CPAN

#!perl

use Test::More;
plan skip_all => 'POD tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};

eval 'use Test::Pod 1.14';
plan skip_all => 'Test::Pod v1.14 required for testing POD' if $@;
eval 'use Pod::Simple';
plan skip_all => 'Pod::Simple v3.28 required for testing POD encoding' if $@;

for my $pod ( all_pod_files() ) {
    my $parser = Pod::Simple->new();
    $parser->parse_file($pod);
    next if !$parser->content_seen();

    my $enc = $parser->encoding();
    ok( defined $enc, "=encoding exists: $pod" ) && like( $enc, qr/^utf-?8$/i, "=encoding is utf8: $pod" );
}

t/pod-spelling.t  view on Meta::CPAN

#!perl

use Test::More;
plan skip_all => 'POD tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};

eval 'use Test::Spelling 0.19';
plan skip_all => 'Test::Spelling v0.19 required for testing POD' if $@;

add_stopwords( map { split /[\s\:\-]/ } readline(*DATA) );
$ENV{LANG} = 'C';
all_pod_files_spelling_ok();

__DATA__
MERCHANTABILITY
Muey

t/pod-version.t  view on Meta::CPAN

#!perl

use Test::More;
plan skip_all => 'POD tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};

eval 'use Test::Pod 1.14';
plan skip_all => 'Test::Pod v1.14 required for testing POD' if $@;
eval 'use Pod::Simple::SimpleTree 3.28';
plan skip_all => 'Pod::Simple::SimpleTree v3.28 required for testing POD version' if $@;
eval 'use Module::Want 0.5';
plan skip_all => 'Module::Want v0.5 required for testing POD version' if $@;

my $ns_regex = Module::Want::get_ns_regexp();

for my $pod ( all_pod_files() ) {

    my $version_section;
    my $next = 0;
    for my $section ( @{ Pod::Simple::SimpleTree->new->parse_file($pod)->root } ) {
        next unless ref($section) eq 'ARRAY';

t/pod.t  view on Meta::CPAN

#!perl

use Test::More;
plan skip_all => 'POD tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};

eval 'use Test::Pod 1.14';
plan skip_all => 'Test::Pod v1.14 required for testing POD' if $@;
all_pod_files_ok();



( run in 0.674 second using v1.01-cache-2.11-cpan-ceb78f64989 )