[libpod-wsdl-perl] 01/07: add patch fixing bad comparison of XML strings in tests. Closes: #710981

Damyan Ivanov dmn at moszumanska.debian.org
Thu Jan 16 08:43:46 UTC 2014


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

dmn pushed a commit to branch master
in repository libpod-wsdl-perl.

commit 050f901ee0a9c9e23291af8a7b0bd40f4dc23468
Author: Damyan Ivanov <dmn at debian.org>
Date:   Thu Jan 16 08:24:34 2014 +0000

    add patch fixing bad comparison of XML strings in tests. Closes: #710981
---
 debian/changelog                        |  4 +++
 debian/patches/fix-xml-comparison.patch | 60 +++++++++++++++++++++++++++++++++
 debian/patches/series                   |  1 +
 3 files changed, 65 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index fb01a00..b89e2aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,10 @@ libpod-wsdl-perl (0.061-2) UNRELEASED; urgency=low
   * debian/copyright: migrate pre-1.0 format to 1.0 using "cme fix dpkg-
     copyright"
 
+  [ Damyan Ivanov ]
+  * add patch fixing bad comparison of XML strings in tests
+    Closes: #710981
+
  -- gregor herrmann <gregoa at debian.org>  Tue, 19 Jul 2011 14:45:44 +0200
 
 libpod-wsdl-perl (0.061-1) unstable; urgency=low
diff --git a/debian/patches/fix-xml-comparison.patch b/debian/patches/fix-xml-comparison.patch
new file mode 100644
index 0000000..fb1ca84
--- /dev/null
+++ b/debian/patches/fix-xml-comparison.patch
@@ -0,0 +1,60 @@
+Description: use Test::XML for comparing XML strings
+ Due to the hash randomisation feature in perl 5.17.5+, comparing the string
+ representation of complex XML structures is very fragile, as the order of
+ attribute serialization is no longer deterministic.
+ Test::XML's is_xml() function solves this, by allowing order differences.
+Author: Damyan Ivanov <dmn at debian.org>
+Forwarded: yes
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=81571
+Bug-Debian: http://bugs.debian.org/710981
+
+--- a/t/11WSDL01basic.t
++++ b/t/11WSDL01basic.t
+@@ -6,6 +6,7 @@ use lib length $0 > 10 ? substr $0, 0, l
+ use strict;
+ use warnings;
+ use XML::XPath;
++use Test::XML;
+ 
+ eval {
+ 	new Pod::WSDL(source => 'bla');
+@@ -90,7 +91,7 @@ my $outputtest;
+ 
+ my $tmp = $p->WSDL;
+ $tmp =~ s/<!-- WSDL.*?-->\n//;
+-ok($outputtest eq $tmp, "Pretty works.");
++is_xml($outputtest, $tmp, "Pretty works.");
+ 
+ $outputtestFile = $0;
+ $outputtestFile =~ s![^/]+$!outputtest002.xml!;
+@@ -108,8 +109,8 @@ my $outputtest2;
+ $tmp = $p->WSDL(pretty => 0);
+ $tmp =~ s/<!-- WSDL.*?-->\n//;
+ #print "--->$tmp<---\n";
+-ok($outputtest2 eq $tmp, "Switch pretty off works.");
++is_xml($outputtest2, $tmp, "Switch pretty off works.");
+ 
+ $tmp = $p->WSDL(pretty => 1);
+ $tmp =~ s/<!-- WSDL.*?-->\n//;
+-ok($outputtest eq $tmp, "Switch pretty on works.");
++is_xml($outputtest, $tmp, "Switch pretty on works.");
+--- a/META.yml
++++ b/META.yml
+@@ -17,6 +17,7 @@ requires:
+   IO::Scalar: 2.110
+   Pod::Text: 2.21
+   Test::More: 0.47
++  Test::XML: 0
+   XML::Writer: 0.531
+   XML::XPath: 1.13
+ resources:
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -24,6 +24,7 @@ my %WriteMakefileArgs = (
+     'IO::Scalar' => '2.110',
+     'Pod::Text' => '2.21',
+     'Test::More' => '0.47',
++    'Test::XML' => 0,
+     'XML::Writer' => '0.531',
+     'XML::XPath' => '1.13'
+   },
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e25d2db
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-xml-comparison.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libpod-wsdl-perl.git



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