Permalink
Browse files

Changed calls to File::Compare::compare() to run in 'text mode' by ad…

…ding a -1 argument. Suggested by Max, commenting on the bug in RT. bug #56642
  • Loading branch information...
1 parent e6a005a commit 84c6603cb24f13e5fcd90a547900ed68d71b69f7 @neilb committed Feb 12, 2012
Showing with 9 additions and 6 deletions.
  1. +3 −0 Changes
  2. +1 −1 t/reader.t
  3. +5 −5 t/simple.t
View
@@ -2,6 +2,9 @@ Revision history for perl distribution Graph-ReadWrite
2.01 2012-02-12
+ - changed calls to File::Compare::compare() to hopefully cope with
+ EOL differences between Windows and Unix. Reported by Philip Potter,
+ and fix noted by Max
- renamed ChangeLog to Changes and reformatted as per CPAN::Changes::Spec
2.00 2005-01-02
View
@@ -55,7 +55,7 @@ $writer = Graph::Writer::HTK->new();
if (defined($reader) && defined($writer)
&& ($ingraph = $reader->read_graph($testfile))
&& $writer->write_graph($ingraph, $genfile)
- && compare($genfile, $testfile) == 0)
+ && compare($genfile, $testfile, -1) == 0)
{
print "ok 2\n";
} else {
View
@@ -36,7 +36,7 @@ $expected = 't/data/simple.xml';
$writer = Graph::Writer::XML->new();
if (defined($writer)
&& $writer->write_graph($graph, $genfile)
- && compare($genfile, $expected) == 0)
+ && compare($genfile, $expected, -1) == 0)
{
print "ok 1\n";
} else {
@@ -52,7 +52,7 @@ $expected = 't/data/simple.htk';
$writer = Graph::Writer::HTK->new();
if (defined($writer)
&& $writer->write_graph($graph, $genfile)
- && compare($genfile, $expected) == 0)
+ && compare($genfile, $expected, -1) == 0)
{
print "ok 2\n";
} else {
@@ -68,7 +68,7 @@ $expected = 't/data/simple.dot';
$writer = Graph::Writer::Dot->new();
if (defined($writer)
&& $writer->write_graph($graph, $genfile)
- && compare($genfile, $expected) == 0)
+ && compare($genfile, $expected, -1) == 0)
{
print "ok 3\n";
} else {
@@ -84,7 +84,7 @@ $expected = 't/data/simple.vcg';
$writer = Graph::Writer::VCG->new();
if (defined($writer)
&& $writer->write_graph($graph, $genfile)
- && compare($genfile, $expected) == 0)
+ && compare($genfile, $expected, -1) == 0)
{
print "ok 4\n";
} else {
@@ -100,7 +100,7 @@ $expected = 't/data/simple.davinci';
$writer = Graph::Writer::daVinci->new();
if (defined($writer)
&& $writer->write_graph($graph, $genfile)
- && compare($genfile, $expected) == 0)
+ && compare($genfile, $expected, -1) == 0)
{
print "ok 5\n";
} else {

0 comments on commit 84c6603

Please sign in to comment.