EPublisher

 view release on metacpan or  search on metacpan

t/07_run_two.t  view on Meta::CPAN


$obj->run( ['Test'] );

my $check = q!100: Module 101: =pod

=head1 Text - a test library for text output 200: Text !;
is( $debug, $check, 'debug' );


my $txt_check   = "Text - a test library for text output\n    Ein Absatz im POD.\n\n";
my $txt_content = do{ local( @ARGV, $/) = $txt->filename; <> };
is ( $txt_content, $txt_check, 'check generated text' );

sub debug{
    $debug .= $_[0] . " ";
}

t/source_dir.t  view on Meta::CPAN

    );

    my @pods = $source->load_source( $dir );
    is_deeply \@pods, [ { pod => $test_pod, title => 'TEST', filename => 'Test.pod' } ];
    is $debug, '';
}

done_testing();

sub slurp {
    local (@ARGV, $/) = shift;
    <>;
}

{
    package
        Mock::Publisher;

    sub new { bless {}, shift }
    sub debug { $debug = $_[1] };
}

t/source_dir3.t  view on Meta::CPAN

    );

    my @pods = $source->load_source;
    is_deeply \@pods, [ { pod => $test_pod, title => 'Test.pod', filename => 'Test.pod' } ];
    is $debug, '';
}

done_testing();

sub slurp {
    local (@ARGV, $/) = shift;
    <>;
}

{
    package
        Mock::Publisher;

    sub new { bless {}, shift }
    sub debug { $debug = $_[1] };
}

t/source_file.t  view on Meta::CPAN

    );

    my @pods = $source->load_source( $file );
    is_deeply \@pods, [ { pod => $test_pod, title => 'TEST', filename => 'Test.pod' } ];
    is $debug, '';
}

done_testing();

sub slurp {
    local (@ARGV, $/) = shift;
    <>;
}

{
    package
        Mock::Publisher;

    sub new { bless {}, shift }
    sub debug { $debug = $_[1] };
}

t/source_module.t  view on Meta::CPAN


    my @pods = $source->load_source( 'Text' );
    (my $text_pod = $test_pod) =~ s{1 Another}{2 };
    is_deeply \@pods, [ { pod => $text_pod, title => '', filename => 'Text.pm' } ];
    is $debug, '';
}

done_testing();

sub slurp {
    local (@ARGV, $/) = shift;
    my $content = <>;

    my $skip = shift;
    $content =~ s{\A(?:[^\n]*\n){$skip}}{};
    
    return $content;
}

{
    package

t/target_text.t  view on Meta::CPAN

}

{
    my $output = $target->deploy( {} );
    is $output, undef;
}

{
    my $output = $target->deploy( "=head1 TEST\n\nHello World!" );
    ok $output;
    my $text = do { local (@ARGV, $/) = $output; <> };
    is $text, "TEST\n    Hello World!\n\n";
}

my $publisher = $target->publisher;
isa_ok $publisher, 'Mock::Publisher';


done_testing();

{

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.208 second using v1.00-cache-2.02-grep-82fe00e-cpan-c9a218a2bbc )