Acme-MetaSyntactic-Themes-Abigail

 view release on metacpan or  search on metacpan

t/980_versions.t  view on Meta::CPAN

sub version;

#
# For a minute or two, I considered using File::Find. 
#
# Henry Spencer was right:
#
#   "Those who don't understand Unix are condemned to reinvent it, poorly."
#

undef $ENV {PATH};
my $FIND = "/usr/bin/find";

my $top   = -d "blib" ? "blib/lib" : "lib";
my @files = `$FIND $top -name [a-z_]*.pm`;
chomp @files;

my $main_version = version "$top/Acme/MetaSyntactic/Themes/Abigail.pm";
unless ($main_version) {
    fail "Cannot find a version in main file";
    done_testing;

t/982_git.t  view on Meta::CPAN

unless ($ENV {AUTHOR_TESTING}) {
    plan skip_all => "AUTHOR tests";
    exit;
}

unless (-f ".git/config") {
    plan skip_all => "This is not a git repository";
    exit;
}

undef $ENV {PATH};
my ($GIT)  = grep {-x} qw [/opt/git/bin/git /opt/local/bin/git];
my ($HEAD) = grep {-x} qw [/usr/bin/head];

my @output = `$GIT status --porcelain`;

ok @output == 0, "All files are checked in";

my @tags = sort grep {/^release/} `$GIT tag`;

chomp (my $final_tag = $tags [-1]);

t/984_pod.t  view on Meta::CPAN


use strict;
use warnings;
no  warnings 'syntax';

unless ($ENV {AUTHOR_TESTING}) {
    plan skip_all => "AUTHOR tests";
    exit;
}

undef $ENV {PATH};
my $FIND  = "/usr/bin/find";
my $CAT   = "/bin/cat";

my $top   = -d "blib" ? "blib/lib" : "lib";
my @files = `$FIND $top -name [a-z_]*.pm`;
chomp @files;

my @skip  = `$CAT MANIFEST.SKIP`;
chomp @skip;
my %skip  = map {$_ => 1} @skip;

my $main  = "$top/Acme/MetaSyntactic/Themes/Abigail.pm";

open my $fh, "<", $main or do {
    fail "Open $main: $!";
    done_testing;
    exit;
};

undef $/;
my $text = <$fh>;

foreach my $file (@files) {
    next if $skip {$file};
    $file =~ s!.*/!!;
    $file =~ s/\.pm//;
    ok $text =~ /C<< \Q$file\E >>/, "Theme '$file' mentioned in main POD";
}




( run in 1.509 second using v1.01-cache-2.11-cpan-d80b1682f3f )