Subject: | t/events test fails randomly |
This is on "Fedora Core release 0.94 (Severn)", which is the second test release of what will become the successor of Red Hat Linux 9.
Summary: In "make test", t/events fails randomly because &Events_Calc returns an unsorted list of events and the test expects constant order. Perl's "keys" function returns keys in random order.
Details and example error output at:
https://bugzilla.fedora.us/show_bug.cgi?id=714#c7
Proposed fix (see patch) would be to sort the returned list of events in &Events_Calc, so it would be safe to expect a constant order in t/events. Alternatively, I could think of doing the sorting in the test.pl code.
diff -Nur DateManip-5.42a-orig/Manip.pm DateManip-5.42a/Manip.pm
--- DateManip-5.42a-orig/Manip.pm 2003-07-02 18:42:47.000000000 +0200
+++ DateManip-5.42a/Manip.pm 2003-09-28 13:11:46.000000000 +0200
@@ -5117,7 +5117,7 @@
$tmp =~ s/^!//;
delete $tmp{$tmp};
}
- push(@ret,$date,[ keys %tmp ]);
+ push(@ret,$date,[ reverse sort keys %tmp ]);
}
return \@ret;