A test plan states how many checks a file expects to run.

Plan Counts

plan_counts.pl
use strict;
use warnings;

my $planned = ;
my @checks = ("ok", "ok", "not ok");
my $ran = scalar @checks;
my $plan_line = "1..$planned";
my $status = $planned == $ran ? "matched" : "mismatch";

print "plan=$plan_line\n";
print "ran=$ran\n";
print "status=$status\n";
use strict;
use warnings;

my $planned = ;
my @checks = ("ok", "ok", "not ok");
my $ran = scalar @checks;
my $plan_line = "1..$planned";
my $status = $planned == $ran ? "matched" : "mismatch";

print "plan=$plan_line\n";
print "ran=$ran\n";
print "status=$status\n";
use strict;
use warnings;

my $planned = ;
my @checks = ("ok", "ok", "not ok");
my $ran = scalar @checks;
my $plan_line = "1..$planned";
my $status = $planned == $ran ? "matched" : "mismatch";

print "plan=$plan_line\n";
print "ran=$ran\n";
print "status=$status\n";
plan-counts Plan counts help a test runner notice when a file exits too early or runs more checks than expected.