blob: fa56b4b5ba05f371c4bbfab59b382d68af8aa639 (
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
27
|
use Test::More;
use Test::Deep;
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;
|