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