5 use System::Introspector::Probe::ResolvConf;
7 my $probe = System::Introspector::Probe::ResolvConf->new(
8 resolv_conf_file => "$FindBin::Bin/data/resolv.conf",
10 my $result = $probe->gather;
11 ok $result, 'received data';
12 my $data = $result->{resolv_conf_file};
13 ok $data, 'received resolv.conf data';
15 is $data->{__error__}, undef, 'no errors';
16 ok $data->{file_name}, 'received file name';
17 ok $data->{body}, 'received file body';
19 like $data->{body}, qr{domain\s+foo}, 'domain specification';
20 like $data->{body}, qr{search\s+bar}, 'search specification';
21 like $data->{body}, qr{nameserver\s+baz}, 'first nameserver specification';
22 like $data->{body}, qr{nameserver\s+qux}, 'second nameserver specification';