summaryrefslogtreecommitdiff
path: root/t/12-uptime.t
blob: 5da340c24a993cb773a2ccbb9fa8419ecc0aff9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use Test::Most;
use Test::Warnings;

use File::Which qw/ which /;
use Scalar::Util 'looks_like_number';

my $path = which("uptime");

plan skip_all => "no uptime found"
    unless $path && -x $path;

use_ok 'Sys::CpuLoad', 'uptime';

my @load = uptime();

cmp_deeply
  \@load,
  [ (code(\&looks_like_number)) x 3 ], 'load';

diag "@load";

done_testing;