X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fgraph.t;h=f580465e8053fb36da3fbef8827fe4cf737071be;hb=5ac9acd842b39856560430f8268b00364983a017;hp=426d8cc0195ce7e60a460b217ee862e90f673ea8;hpb=0ecb975c8c0b00c03bbe940b44bb2ce719ea20e1;p=scpubgit%2Fstemmatology.git diff --git a/t/graph.t b/t/graph.t index 426d8cc..f580465 100644 --- a/t/graph.t +++ b/t/graph.t @@ -3,10 +3,14 @@ use strict; use warnings; use Test::More; use lib 'lib'; +use File::Which; use Text::Tradition; use XML::LibXML; use XML::LibXML::XPathContext; +plan skip_all => 'Need Graphviz installed to test graphs' + unless File::Which::which( 'dot' ); + my $datafile = 't/data/Collatex-16.xml'; my $tradition = Text::Tradition->new( @@ -43,9 +47,6 @@ is( scalar( @svg_nodes ), 9, @svg_edges = $part_xpc->findnodes( '//svg:g[@class="edge"]' ); is( scalar( @svg_edges ), 10, "Correct number of edges in the subgraph" ); -open( OUT, ">test.svg" ); -print OUT $part_svg->toString(); -close OUT; $part_svg = $parser->parse_string( $collation->as_svg( { from => 10, to => 13 } ) ); # start, no end is( $part_svg->documentElement->nodeName(), 'svg', "Got an svg subgraph in the middle" );