Test-Chunks

 view release on metacpan or  search on metacpan

lib/Test/Chunks.pm  view on Meta::CPAN

209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
    ) {
        Test::More::is($actual, $expected, $name);
    }
    else {
        $name = '' unless defined $name;
        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$actual, \$expected);
    }
}
 
sub run(&) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $chunk (@{$self->chunk_list}) {
        $chunk->run_filters unless $chunk->is_filtered;
        &{$callback}($chunk);
    }
}
 
sub run_is() {
    (my ($self), @_) = find_my_self(@_);

t/base64.t  view on Meta::CPAN

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
=== Test Two
 
--- encoded
c3ViIHJ1bigmKSB7CiAgICBteSAkc2VsZiA9ICRkZWZhdWx0X29iamVjdDsKICAgIG15ICRjYWxs
YmFjayA9IHNoaWZ0OwogICAgZm9yIG15ICRjaHVuayAoJHNlbGYtPmNodW5rcykgewogICAgICAg
ICZ7JGNhbGxiYWNrfSgkY2h1bmspOwogICAgfQp9Cg==
 
--- decoded base64_encode
 
sub run(&) {
    my $self = $default_object;
    my $callback = shift;
    for my $chunk ($self->chunks) {
        &{$callback}($chunk);
    }
}



( run in 0.717 second using v1.01-cache-2.11-cpan-26ccb49234f )