Subject: | t/BSD-getloadavg.t fails if a non-dot number is returned |
I see fails like this (also visible at CPAN Testers, see http://analysis.cpantesters.org/reports_by_field?distv=BSD-getloadavg-0.03;field=qr%3A%28Failed%20test\s%2B\S%2B.*%29 ):
# You named your test '1'. You shouldn't use numbers for your test names.
# Very confusing.
# Failed test '1'
# at t/BSD-getloadavg.t line 14.
# '1'
# doesn't match '(?^:^(0|\d+\.\d+)$)'
# Looks like you failed 1 test of 5.
t/BSD-getloadavg.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests
Probably the regexp in the test should be changed to something like qr/^(0|\d+(?:\.\d+)?)$/
Or alternatively use looks_like_number from Scalar::Util.