1341e3371ddd4893c48ea16f43ac6579d2a483bd
[scpubgit/System-Introspector.git] / t / resolvconf.t
1 use strictures 1;
2 use Test::More;
3 use FindBin;
4
5 use System::Introspector::Probe::ResolvConf;
6
7 my $probe = System::Introspector::Probe::ResolvConf->new(
8     resolv_conf_file => "$FindBin::Bin/data/resolv.conf",
9 );
10 my $result = $probe->gather;
11 ok $result, 'received data';
12 my $data = $result->{resolv_conf};
13 ok $data, 'received resolv.conf data';
14
15 is_deeply $data,
16     [[qw( domain foo )],
17      [qw( search bar )],
18      [qw( nameserver baz )],
19      [qw( nameserver qux )]],
20     'parsing worked';
21
22 done_testing;