[libhtml-wikiconverter-moinmoin-perl] 02/03: add a patch sorting table attributes, fixing test failure with 50% probability due to hash key order randomization since perl 5.18. Closes: #720018

Damyan Ivanov dmn at moszumanska.debian.org
Sat Jun 6 14:18:02 UTC 2015


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

dmn pushed a commit to branch master
in repository libhtml-wikiconverter-moinmoin-perl.

commit 0a7eb6e66082af9f91d6313b8cbece6242dd23bd
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sat Jun 6 14:16:55 2015 +0000

    add a patch sorting table attributes, fixing test failure with 50% probability due to hash key order randomization since perl 5.18. Closes: #720018
---
 debian/patches/series                 |  1 +
 debian/patches/sort-table-attrs.patch | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..97692e6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+sort-table-attrs.patch
diff --git a/debian/patches/sort-table-attrs.patch b/debian/patches/sort-table-attrs.patch
new file mode 100644
index 0000000..ae333ef
--- /dev/null
+++ b/debian/patches/sort-table-attrs.patch
@@ -0,0 +1,29 @@
+Description: _attrs2style: sort table attributes
+ Without this, tests fail in 50% of the time die to the hash randomization in
+ perl 5.18+
+Bug-Debian: https://bugs.debian.org/720018
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=88003
+Author: Damyan Ivanov <dmn at debian.org>
+
+--- a/lib/HTML/WikiConverter/MoinMoin.pm
++++ b/lib/HTML/WikiConverter/MoinMoin.pm
+@@ -135,7 +135,7 @@ sub _attrs2style {
+   my( $node, @attrs ) = @_;
+   return unless $node;
+   my %attrs = map { $_ => $node->attr($_) } grep $node->attr($_), @attrs;
+-  my $attstr = join '; ', map "$att2prop{$_}:$attrs{$_}", keys %attrs;
++  my $attstr = join '; ', map "$att2prop{$_}:$attrs{$_}", sort keys %attrs;
+   return $attstr || '';
+ }
+ 
+--- a/t/moinmoin.t
++++ b/t/moinmoin.t
+@@ -236,7 +236,7 @@ __H__
+   </table>
+ </html>
+ __W__
+-||<-2 tablestyle="width:100%; background-color:white" id="thing"> thing ||
++||<-2 tablestyle="background-color:white; width:100%" id="thing"> thing ||
+ || next ||<id="crazy"> crazy ||
+ __NEXT__
+ anchors with content (bug #29347) ::enable_anchor_macro(1)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhtml-wikiconverter-moinmoin-perl.git



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