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 / blocks_grep.t
1 use Test::Base;
2
3 my $plan = 1 * blocks('foo') + 3;
4
5 plan tests => $plan;
6
7 is $plan, 5, 'Make sure plan adds up';
8
9 for my $block (blocks('foo')) {
10     is $block->foo,
11        exists($block->{bar}) ? $block->bar : 'no bar';
12 }
13
14 eval { blocks(foo => 'bar') };
15 like "$@",
16      qr{^Invalid arguments passed to 'blocks'};
17
18 run_is foo => 'bar';
19
20 __DATA__
21
22 ===
23 --- bar
24 excluded
25
26 ===
27 --- foo
28 included
29 --- bar
30 included
31
32 ===
33 --- foo chomp
34 no bar