This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump Socket::VERSION to 1.95; to match CPAN release
[perl5.git] / cpan / Test-Simple / examples / indent.pl
CommitLineData
2c4d5b9b
SH
1#!/usr/bin/env perl
2
3use strict;
4use warnings;
5
6use lib '../lib';
7use Test::Builder;
8
9=head1 NOTES
10
11Must have explicit finalize
12Must name nest
13Trailing summary test
14Pass chunk o'TAP
15No builder may have more than one child active
16What happens if you call ->finalize with open children
17
18=cut
19
20my $builder = Test::Builder->new;
21$builder->plan(tests => 7);
22for( 1 .. 3 ) {
23 $builder->ok( $_, "We're on $_" );
24 $builder->note("We ran $_");
25}
26{
27 my $indented = $builder->child;
28 $indented->plan('no_plan');
29 for( 1 .. 1+int(rand(5)) ) {
30 $indented->ok( 1, "We're on $_" );
31 }
32 $indented->finalize;
33}
34for( 7, 8, 9 ) {
35 $builder->ok( $_, "We're on $_" );
36}