parse show interface $port adsl-status
[APKPM.git] / t / ZTEDSLAM.t
index 3954f06..cef4747 100755 (executable)
@@ -2,13 +2,20 @@
 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::ZTEDSLAM';
 
-ok my $hash = H1::ZTEDSLAM->hash( '10.99.123.16', '3/39' ), 'new';
+my $ip = shift @ARGV || '10.99.123.16';
 
-diag dump $hash;
+ok my $o = H1::ZTEDSLAM->new( ip => $ip ), "new $ip";
+
+foreach my $port ( @ARGV || qw( 3/39 3/40 ) ) {
+
+       ok my $hash = $o->hash( $port ), "port $port";
+       diag dump $hash;
+
+}