Add the following packages libalgorithm-diff-perl libspiffy-perl libtext-diff-perl...
[pkg-perl] / deb-src / libtest-base-perl / libtest-base-perl-0.54 / t / base64.t
1 use Test::Base;
2
3 plan tests => ~~blocks;
4
5 run_is;
6
7 __END__
8 === Test One
9 --- encoded base64_decode
10 SSBMb3ZlIEx1Y3kK
11
12 --- decoded
13 I Love Lucy
14
15
16
17 === Test Two
18
19 --- encoded
20 c3ViIHJ1bigmKSB7CiAgICBteSAkc2VsZiA9ICRkZWZhdWx0X29iamVjdDsKICAgIG15ICRjYWxs
21 YmFjayA9IHNoaWZ0OwogICAgZm9yIG15ICRibG9jayAoJHNlbGYtPmJsb2NrcykgewogICAgICAg
22 ICZ7JGNhbGxiYWNrfSgkYmxvY2spOwogICAgfQp9Cg==
23
24 --- decoded base64_encode
25
26 sub run(&) {
27     my $self = $default_object;
28     my $callback = shift;
29     for my $block ($self->blocks) {
30         &{$callback}($block);
31     }
32 }
33
34