[libgraph-writer-graphviz-perl] 02/03: Ack NMU, thanks Ian.

gregor herrmann gregoa at debian.org
Sat Feb 8 19:57:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libgraph-writer-graphviz-perl.

commit d9a6a932184f6c6b104c3141b6265ef051410e1f
Author: gregor herrmann <gregoa at debian.org>
Date:   Sat Feb 8 20:54:18 2014 +0100

    Ack NMU, thanks Ian.
    
    Import Ian's commits as quilt patches.
---
 ...de-a-TestUtils.pl-containing-broken-out-l.patch | 96 ++++++++++++++++++++++
 ...sts-Sort-the-keywords-in-the-graph-output.patch | 32 ++++++++
 debian/patches/series                              |  2 +
 3 files changed, 130 insertions(+)

diff --git a/debian/patches/0001-Tests-Provide-a-TestUtils.pl-containing-broken-out-l.patch b/debian/patches/0001-Tests-Provide-a-TestUtils.pl-containing-broken-out-l.patch
new file mode 100644
index 0000000..3a3b02e
--- /dev/null
+++ b/debian/patches/0001-Tests-Provide-a-TestUtils.pl-containing-broken-out-l.patch
@@ -0,0 +1,96 @@
+From bcedbb978208ce08d35e8f317fed5b34695ac1ab Mon Sep 17 00:00:00 2001
+From: Ian Jackson <ijackson at chiark.greenend.org.uk>
+Date: Sat, 8 Feb 2014 17:18:34 +0000
+Subject: [PATCH 1/4] Tests: Provide a TestUtils.pl containing broken-out
+ launder() function
+
+The code for laundering font sizes was duplicated between the tests.
+Instead, break it out into a common function launder() in a new file
+t/TestUtils.pl (which exists just for the tests).
+
+Signed-off-by: Ian Jackson <ijackson at chiark.greenend.org.uk>
+
+squash! Tests: Provide a Test.pm containing
+---
+ MANIFEST       | 1 +
+ t/1.simple.t   | 6 +++---
+ t/2.ioall.t    | 7 ++++---
+ t/TestUtils.pl | 8 ++++++++
+ 4 files changed, 16 insertions(+), 6 deletions(-)
+ create mode 100644 t/TestUtils.pl
+
+diff --git a/MANIFEST b/MANIFEST
+index 749c521..68c47e7 100644
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -14,3 +14,4 @@ README
+ t/0.use.t
+ t/1.simple.t
+ t/2.ioall.t
++t/TestUtils.pl
+diff --git a/t/1.simple.t b/t/1.simple.t
+index 952a07b..66fb1e2 100644
+--- a/t/1.simple.t
++++ b/t/1.simple.t
+@@ -6,6 +6,7 @@ use Test::Simple tests => 1;
+ use IO::All;
+ use Graph;
+ use Graph::Writer::GraphViz;
++require 't/TestUtils.pl';
+ 
+ my @v = qw/Alice Bob Crude Dr/;
+ my $g = Graph->new;
+@@ -17,9 +18,8 @@ $wr->write_graph($g,'t/graph.simple.dot');
+ $/ = undef;
+ my $g1 = <DATA>;
+ my $g2 = io('t/graph.simple.dot')->slurp;
+-# Ignore font-sizes, it's system-dependant
+-$g1 =~ s/\d+/0/g;
+-$g2 =~ s/\d+/0/g;
++launder(\$g1);
++launder(\$g2);
+ ok($g1 eq $g2);
+ unlink('t/graph.simple.dot');
+ 
+diff --git a/t/2.ioall.t b/t/2.ioall.t
+index f18fff8..a489445 100644
+--- a/t/2.ioall.t
++++ b/t/2.ioall.t
+@@ -6,6 +6,7 @@ use Test::Simple tests => 2;
+ use IO::All;
+ use Graph;
+ use Graph::Writer::GraphViz;
++require 't/TestUtils.pl';
+ 
+ my @v = qw/Alice Bob Crude Dr/;
+ my $g = Graph->new;
+@@ -25,9 +26,9 @@ $g2 = $io->slurp;
+ }
+ 
+ ok(-f 't/graph.ioall.dot');
+-# Ignore font-sizes, it's system-dependant
+-$g1 =~ s/\d+/0/g;
+-$g2 =~ s/\d+/0/g;
++
++launder(\$g1);
++launder(\$g2);
+ ok($g1 eq $g2);
+ $io->unlink;
+ 
+diff --git a/t/TestUtils.pl b/t/TestUtils.pl
+new file mode 100644
+index 0000000..4fec3d3
+--- /dev/null
++++ b/t/TestUtils.pl
+@@ -0,0 +1,8 @@
++
++sub launder ($) {
++    my ($gr) = @_;
++    # Ignore font-sizes, it's system-dependant
++    $$gr =~ s/\d+/0/g;
++}
++
++1;
+-- 
+1.9.0.rc3
+
diff --git a/debian/patches/0002-Tests-Sort-the-keywords-in-the-graph-output.patch b/debian/patches/0002-Tests-Sort-the-keywords-in-the-graph-output.patch
new file mode 100644
index 0000000..0fd6513
--- /dev/null
+++ b/debian/patches/0002-Tests-Sort-the-keywords-in-the-graph-output.patch
@@ -0,0 +1,32 @@
+From c0818e59eab55ace2b177d0ea88682c81d2830aa Mon Sep 17 00:00:00 2001
+From: Ian Jackson <ijackson at chiark.greenend.org.uk>
+Date: Sat, 8 Feb 2014 17:22:45 +0000
+Subject: [PATCH 2/4] Tests: Sort the keywords in the graph output
+
+They come out in hash order which is not necessarily stable.
+Fixes FTBFS with perl 5.18 (Debian #711446, CPAN #85950).
+
+Signed-off-by: Ian Jackson <ijackson at chiark.greenend.org.uk>
+---
+ t/TestUtils.pl | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/t/TestUtils.pl b/t/TestUtils.pl
+index 4fec3d3..9338667 100644
+--- a/t/TestUtils.pl
++++ b/t/TestUtils.pl
+@@ -3,6 +3,11 @@ sub launder ($) {
+     my ($gr) = @_;
+     # Ignore font-sizes, it's system-dependant
+     $$gr =~ s/\d+/0/g;
++    # Sort the keywords in the graph output, as they come out
++    # in hash order which isn't necessarily stable.
++    $$gr =~ s{((?:\s+.*\n)+)}{
++        join "\n", sort split /\n/, $1
++    }ge;
+ }
+ 
+ 1;
+-- 
+1.9.0.rc3
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1499de3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Tests-Provide-a-TestUtils.pl-containing-broken-out-l.patch
+0002-Tests-Sort-the-keywords-in-the-graph-output.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libgraph-writer-graphviz-perl.git



More information about the Pkg-perl-cvs-commits mailing list