Subject: | test fails with recent version of Test::More |
Recent versions of Test::More don't like use_ok before plan(). The
attached patch corrects the problem for me.
Cheers,
Marek
Subject: | Devel-Graph.diff |
diff -ruN Devel-Graph-0.12/t/parse.t Devel-Graph-0.12p1/t/parse.t
--- Devel-Graph-0.12/t/parse.t 2007-02-02 18:56:26.000000000 +0100
+++ Devel-Graph-0.12p1/t/parse.t 2009-01-08 09:18:37.275329000 +0100
@@ -6,31 +6,31 @@
# Parse test snippets from t/data/ and compare them to the stored output
+my @files;
+
BEGIN
{
chdir 't' if -d 't';
use lib '../lib';
+ if (@ARGV)
+ {
+ @files = shift;
+ plan tests => 3;
+ }
+ else
+ {
+ # get all files to test
+ opendir(DIR, 'data') or die("Canât opendir 'data': $!");
+ @files = readdir(DIR);
+ closedir DIR;
+ plan tests => 30;
+ }
use_ok ("Devel::Graph") or die($@);
};
#############################################################################
# OO interface
-my @files;
-
-if (@ARGV)
- {
- @files = shift;
- plan tests => 2;
- }
-else
- {
- # get all files to test
- opendir(DIR, 'data') or die("Canât opendir 'data': $!");
- @files = readdir(DIR);
- closedir DIR;
- plan tests => 29;
- }
my $graph;
my @failures;