Subject: | Fix test fails due to hash traversal randomization |
Pod::Simple occasionally fails test when hash iterator randomization is
enabled in 5.17.9.
The solution is to enable $Pod::Simple::XMLOutStream::SORT_ATTRS mode in
the failing test file t/closeys.t
We plan to enable hash traversal randomization in 5.18.
The attached patch from my perl.git branch yves/hv_h_split fixes the bug.
I have marked this patch as important as it is a blocker for 5.18
release.
Subject: | 0001-Fix-test-fails-due-to-hash-traversal-randomization.patch |
From 9e7b62a91521411e68934310e57f7737119c45ef Mon Sep 17 00:00:00 2001
From: Yves Orton <demerphq@gmail.com>
Date: Mon, 18 Feb 2013 07:56:25 +0100
Subject: [PATCH] Fix test fails due to hash traversal randomization
One cannot assume two hashes with the same keys will have the
the same key order. And after hash traversal randomization one
can assume they WONT.
---
cpan/Pod-Simple/t/closeys.t | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/cpan/Pod-Simple/t/closeys.t b/cpan/Pod-Simple/t/closeys.t
index 683ce13..0adf05a 100644
--- a/cpan/Pod-Simple/t/closeys.t
+++ b/cpan/Pod-Simple/t/closeys.t
@@ -24,6 +24,7 @@ sub nowhine {
# $_[0]->{'no_whining'} = 1;
$_[0]->accept_targets("*");
}
+local $Pod::Simple::XMLOutStream::SORT_ATTRS= 1;
&ok(e(
"=begin :foo\n\n=begin :bar\n\nZaz\n\n",
--
1.7.5.4