File: all_in_block.t

package info (click to toggle)
libtest-block-perl 0.13-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 160 kB
  • sloc: perl: 133; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 539 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings;
use Test::More tests => 6;
use Test::Block qw($Plan);

{
	local $Plan = 1;
	ok( Test::Block->all_in_block, 'true at start');
};
{
	local $Plan = 1;
	ok( Test::Block->all_in_block, 'true after a block');
};
ok( Test::Block->all_in_block, 'true immediately outside a block');
ok(!Test::Block->all_in_block, 'false after non-block test');
{
	local $Plan = 1;
	ok( !Test::Block->all_in_block, 'still false in next block');
};
{
	local $Plan = 1;
	ok( !Test::Block->all_in_block, 'still false in following block');
};