5 use System::Introspector::Probe::FileHandles;
7 $ENV{PATH} = "$FindBin::Bin/bin:" . $ENV{PATH};
9 my $probe = System::Introspector::Probe::FileHandles->new;
11 my $data = $probe->gather;
12 ok($data, 'received result');
14 my $handles = $data->{handles};
15 ok($handles, 'received filehandle data');
16 ok(not(grep { not keys %$_ } @$handles), 'keys in all entries');
19 my $fail_probe = System::Introspector::Probe::FileHandles->new(
20 lsof_command => 'lsoffakethisonedoesntexistatleastihopenot',
23 $fail_data = $fail_probe->gather;
24 ok $fail_data, 'received data';
25 like $fail_data->{__error__}, qr{lsoffake}, 'correct error is set';