use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 4;
use Data::Dump qw(dump);
use lib 'lib';
use_ok 'H1::ZTEMSAN';
-ok my $hash = H1::ZTEMSAN->hash( '10.99.2.115', '0/15/0' ), 'new';
+my $ip = shift @ARGV || '10.99.2.115';
+my @ports = @ARGV;
+@ports = qw( 0/15/0 0/16/0 ) unless @ports;
+
+ok my $o = H1::ZTEMSAN->new( ip => $ip ), "new $ip";
+
+foreach my $port ( @ports ) {
+
+ ok my $hash = $o->hash( $port ), "port $port";
+ diag dump $hash;
+}
-diag dump $hash;