blob: 02bc939eba30f4b53239dfb19076fd69d3bd8359 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
use Test::Most;
use Test::Warnings;
use File::Which qw/ which /;
use Scalar::Util 'looks_like_number';
my $path = which("w");
plan skip_all => "no w found"
unless $path && -x $path;
use_ok 'Sys::CpuLoad', 'uptime';
no warnings 'once';
$Sys::CpuLoad::UPTIME = $path;
my @load = uptime();
cmp_deeply
\@load,
[ (code(\&looks_like_number)) x 3 ], 'load';
diag "@load";
done_testing;
|