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 / filters_map.t
1 use Test::Base tests => 7;
2
3 eval {
4     filters_map {
5         perl => ['eval'],
6         text => ['chomp', 'lines', 'array'],
7     };
8 };
9 like $@, qr{Can't locate object method "filters_map"};
10
11 filters {
12     perl => ['eval'],
13     text => ['chomp', 'lines', 'array'],
14 };
15
16 run {
17     my $block = shift;
18     is ref($block->perl), 'ARRAY';
19     is ref($block->text), 'ARRAY';
20     is_deeply $block->perl, $block->text;
21 };
22
23 __DATA__
24 === One
25 --- perl
26 [
27     "One\n",
28     "2nd line\n",
29     "\n",
30     "Third time's a charm",
31 ]
32 --- text
33 One
34 2nd line
35
36 Third time's a charm
37 === Two
38 --- text
39 tic tac toe
40 --- perl
41 [ 'tic tac toe' ]
42