summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2010-09-13 19:14:04 -0700
committerFlorian Ragwitz <rafl@debian.org>2010-09-15 18:59:41 +0200
commitc4ef71839c80edd34826a0701d330383d1d26433 (patch)
treed9c8bbadd7d8030377a86dc700d58f69f43f30e8 /t
parent140f53691aaf373827763070261a076e87563f46 (diff)
downloadperl-c4ef71839c80edd34826a0701d330383d1d26433.tar.gz
Add done_testing from Test::More
Diffstat (limited to 't')
-rw-r--r--t/test.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/test.pl b/t/test.pl
index eeb71ef8cc..f6ad09c642 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -54,6 +54,17 @@ sub plan {
$planned = $n;
}
+
+# Set the plan at the end. See Test::More::done_testing.
+sub done_testing {
+ my $n = $test - 1;
+ $n = shift if @_;
+
+ _print "1..$n\n";
+ $planned = $n;
+}
+
+
END {
my $ran = $test - 1;
if (!$NO_ENDING) {