File: spec_string.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 (29 lines) | stat: -rw-r--r-- 323 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
24
25
26
27
28
29
use Test::Base;

filters 'chomp';
spec_string <<'...';
===
--- foo
1
--- bar
2
===
--- foo
3
--- bar
4
...

plan tests => 3 * blocks;

run {
    my $block = shift;
    is ref($block), 'Test::Base::Block';
};

my @blocks = blocks;

is $blocks[0]->foo, 1;
is $blocks[0]->bar, 2;
is $blocks[1]->foo, 3;
is $blocks[1]->bar, 4;