Subject: | FAIL GraphViz2-1.03 , no t\html, use lib interference for scripts/parse.isa.pl |
there is no t\html directory, so all scripts fail like
Can't open(> t\html\Heawood.svg): No such file or directory at
lib/GraphViz2.pm line 551.
after fixing that, scripts/parse.isa.pl would die with
syntax error at lib/GraphViz2.pm line 19, near "fieldhash my "
diff -ru GraphViz2-1.03/scripts/parse.isa.pl
GraphViz2-1.03-new/scripts/parse.isa.pl
--- GraphViz2-1.03/scripts/parse.isa.pl 2011-06-18 23:30:10.000000000 -0700
+++ GraphViz2-1.03-new/scripts/parse.isa.pl 2011-06-24
01:46:41.031250000 -0700
@@ -3,7 +3,6 @@
# Note: t/test.t searches for the next line.
# Annotation: Demonstrates graphing a Perl class hierarchy.
-use lib 't/lib';
use strict;
use warnings;
@@ -39,7 +38,8 @@
my($parser) = GraphViz2::Parse::ISA -> new(graph => $graph);
# These classes live in t/lib/.
-
+# use lib 't/lib';
+require lib; lib->import('t/lib');
$parser -> create(class => 'Parent::Child::Grandchild', ignore => []);
my($format) = shift || 'svg';
diff -ru GraphViz2-1.03/t/test.t GraphViz2-1.03-new/t/test.t
--- GraphViz2-1.03/t/test.t 2011-06-18 23:30:10.000000000 -0700
+++ GraphViz2-1.03-new/t/test.t 2011-06-24 01:55:28.671875000 -0700
@@ -15,16 +15,21 @@
my($count) = 1; # Counting the use_ok above.
my(%script) = GraphViz2::Utils -> new -> get_scripts;
-my($output) = File::Spec -> catfile('t', 'html', '*');
+my $t_html = File::Spec -> catfile('t', 'html');
+my($output) = File::Spec -> catfile( $t_html, '*');
+mkdir $t_html;
unlink glob($output);
my($stdout, $stderr);
for my $script (sort keys %script)
{
+ next if $script !~ /.pl$/; # gVim
+ my @args = ( $^X, '-Ilib', $script, 'svg', File::Spec ->
catfile($t_html, "$script{$script}.svg") );
+# diag " @args ";
$count++;
- ($stdout, $stderr) = capture{system $^X, '-Ilib', $script, 'svg',
File::Spec -> catfile('t', 'html', "$script{$script}.svg")};
+ ($stdout, $stderr) = capture{system @args};
ok(length($stderr) == 0, "$script runs without error");
}