Commit | Line | Data |
6bc93875 |
1 | use strictures 1; |
2 | use Test::More; |
3 | use FindBin; |
4 | |
afd7c030 |
5 | use System::Introspector::Probe::Hosts; |
6bc93875 |
6 | |
afd7c030 |
7 | my $probe = System::Introspector::Probe::Hosts->new( |
6bc93875 |
8 | hosts_file => "$FindBin::Bin/data/hosts", |
9 | ); |
505ca707 |
10 | |
11 | my $result = $probe->gather; |
12 | ok $result, 'received data'; |
13 | my $data = $result->{hosts}; |
14 | ok $data, 'received hosts data'; |
6bc93875 |
15 | |
16 | is_deeply $data, |
17 | [['1.2.3.4', qw( foo bar )], ['2.3.4.5', 'bar']], |
18 | 'parsing worked'; |
19 | |
20 | done_testing; |