Subject: | "Bad plan" on Windows |
Actually applies to all platforms that don't have ualarm(): the test is
not calling skip() for the missing tests.
Attached patch also silences some "undefined value" warnings, as xdefine
is just an empty file on Windows, so <XDEFINE> will return undef.
Subject: | bad-plan.patch |
--- a/t/HiRes.t 2010-02-12 16:48:11.000000000 -0800
+++ b/t/HiRes.t 2010-03-17 11:25:00.873495300 -0700
@@ -102,7 +102,7 @@
my $xdefine = '';
if (open(XDEFINE, "xdefine")) {
- chomp($xdefine = <XDEFINE>);
+ chomp($xdefine = <XDEFINE> || "");
close(XDEFINE);
}
@@ -784,7 +784,10 @@
}
}
-if ($have_ualarm) {
+unless ($have_ualarm) {
+ skip 45..48;
+}
+else {
{
my $alrm = 0;
$SIG{ALRM} = sub { $alrm++ };