p4raw-id: //depot/perl@23090
$Level = 1;
my $test = 1;
my $planned;
+my $noplan;
$TODO = 0;
$NO_ENDING = 0;
my $n;
if (@_ == 1) {
$n = shift;
+ if ($n eq 'no_plan') {
+ undef $n;
+ $noplan = 1;
+ }
} else {
my %plan = @_;
$n = $plan{tests};
}
- print STDOUT "1..$n\n";
+ print STDOUT "1..$n\n" unless $noplan;
$planned = $n;
}
END {
my $ran = $test - 1;
- if (!$NO_ENDING && defined $planned && $planned != $ran) {
- print STDERR "# Looks like you planned $planned tests but ran $ran.\n";
+ if (!$NO_ENDING) {
+ if (defined $planned && $planned != $ran) {
+ print STDERR
+ "# Looks like you planned $planned tests but ran $ran.\n";
+ } elsif ($noplan) {
+ print "1..$ran\n";
+ }
}
}