File: oo_run.t

package info (click to toggle)
libtest-base-perl 0.88-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 668 kB
  • ctags: 106
  • sloc: perl: 931; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 355 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use Test::Base;

my $blocks = Test::Base->new;
$blocks->delimiters(qw(%%% ***))->filters('lower');

plan tests => 3 * $blocks->blocks;

$blocks->run(sub {
    my $block = shift;
    is $block->foo, $block->bar, $block->name;
});

$blocks->run_is('foo', 'bar');
$blocks->run_like('foo', qr{x});

sub lower { lc }

__DATA__
%%% Test
*** foo
xyz
*** bar
XYZ