4 |
use strict; |
use strict; |
5 |
use autodie; |
use autodie; |
6 |
|
|
7 |
use Test::More tests => 7; |
use Test::More tests => 9; |
8 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
9 |
|
|
10 |
use_ok 'client'; |
use_ok 'client'; |
18 |
ok( client::conf( $host => 'test' => 'value' ), 'conf set' ); |
ok( client::conf( $host => 'test' => 'value' ), 'conf set' ); |
19 |
cmp_ok( client::conf( $host => 'test' ), 'eq', 'value', 'value' ); |
cmp_ok( client::conf( $host => 'test' ), 'eq', 'value', 'value' ); |
20 |
|
|
21 |
|
ok( my $ip = client::next_ip(), 'next_ip' ); |
22 |
|
diag $ip; |
23 |
|
|
24 |
diag "cleanup"; |
diag "cleanup"; |
25 |
ok( unlink($test_path), "unlink $test_path" ); |
ok( unlink($test_path), "unlink $test_path" ); |
26 |
$test_path =~ s{/[^/]+$}{}; |
$test_path =~ s{/[^/]+$}{}; |
27 |
ok( rmdir($test_path), "rmdir $test_path" ); |
ok( rmdir($test_path), "rmdir $test_path" ); |
28 |
|
|
29 |
|
ok( my $ip = client::ip_from_mac( 'AC:DE:48:00:00:00' ), 'ip_from_mac' ); |
30 |
|
diag $ip; |