From 9f3aceccf7a1f7c08312be6cb34aa688bd958677 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 9 Aug 2014 13:11:07 +0200 Subject: [PATCH] Pspp.t: Sort value labels before comparing them. This test failed on some platforms because it was iterating a hash. The order of an iterated hash is undefined. This change sorts before comparing thus avoiding the problem. Thanks to Friedrich Beckmann for this patch. --- perl-module/t/Pspp.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-module/t/Pspp.t b/perl-module/t/Pspp.t index e3ee08def8..495064174e 100644 --- a/perl-module/t/Pspp.t +++ b/perl-module/t/Pspp.t @@ -374,7 +374,7 @@ RESULT my $vl = $var->get_value_labels (); print MYFILE "Value Labels:\n"; - print MYFILE "$_ => $vl->{$_}\n" for keys %$vl; + print MYFILE "$_ => $vl->{$_}\n" for (sort keys %$vl); } while (my @c = $sf->get_next_case () ) @@ -391,16 +391,16 @@ RESULT ok (compare ("$tempdir/out.txt", < threes 1111 => ones 2222 => twos +3333 => threes Variable 1 is "longstring", label is "A Long String Variable" Value Labels: Variable 2 is "numeric", label is "A Numeric Variable" Value Labels: 1 => Unity -3 => Thripality 2 => Duality +3 => Thripality Variable 3 is "date", label is "A Date Variable" Value Labels: Variable 4 is "dollar", label is "A Dollar Variable" -- 2.30.2