more explicit ipc to work around child-exec issues
[scpubgit/System-Introspector.git] / t / filehandles.t
CommitLineData
d52d96e6 1use strictures 1;
2use Test::More;
3
afd7c030 4use System::Introspector::Probe::FileHandles;
d52d96e6 5
afd7c030 6my $probe = System::Introspector::Probe::FileHandles->new;
d52d96e6 7
df8adc95 8my $data = $probe->gather;
9ok($data, 'received result');
10
11my $handles = $data->{handles};
12ok($handles, 'received filehandle data');
13ok(not(grep { not keys %$_ } @$handles), 'keys in all entries');
d52d96e6 14
9c3e454c 15do {
16 my $fail_probe = System::Introspector::Probe::FileHandles->new(
17 lsof_command => 'lsoffakethisonedoesntexistatleastihopenot',
18 );
19 my $fail_data;
20 $fail_data = $fail_probe->gather;
21 ok $fail_data, 'received data';
22};
23
d52d96e6 24done_testing;