=================================================================== RCS file: /cvs/trango/Net-Telnet-Trango/t/55-network-add_su-su.t,v retrieving revision 1.3 retrieving revision 1.5 diff -u -r1.3 -r1.5 --- trango/Net-Telnet-Trango/t/55-network-add_su-su.t 2007/02/06 17:46:55 1.3 +++ trango/Net-Telnet-Trango/t/55-network-add_su-su.t 2007/02/06 20:59:10 1.5 @@ -1,5 +1,5 @@ #!perl -T -# $RedRiver: 54-network-add_su-su.t,v 1.2 2007/02/06 17:41:14 andrew Exp $ +# $RedRiver: 55-network-add_su-su.t,v 1.4 2007/02/06 20:43:43 andrew Exp $ use Test::More tests => 7; use File::Spec; @@ -8,8 +8,7 @@ use_ok( 'Net::Telnet::Trango' ); } -diag("Testing Net::Telnet::Trango $Net::Telnet::Trango::VERSION, Perl $], $^X"); -diag(" SU tests when adding an SU to an AP"); +diag("55: SU tests when adding an SU to an AP"); my $cfg_file = File::Spec->catfile('t', 'tests.cfg'); @@ -27,8 +26,8 @@ } } - my $type = 'SU'; - my ($host, $pass); + my $type = 'AP'; + my ($host, $pass, $su, $su_pass, $su_id, $su_mac); if ($cfg{$type} && $cfg{$type} =~ /^(\d+\.\d+\.\d+.\d+)$/) { $host = $1; @@ -54,10 +53,24 @@ skip 'No valid SU_MAC in config file', $skipped unless $su_mac; + $type = 'SU'; + if ($cfg{$type} && $cfg{$type} =~ /^(\d+\.\d+\.\d+.\d+)$/) { + $su = $1; + } + + skip 'No valid SU in config file', $skipped unless $su; + + if ($cfg{$type . '_PASSWD'} && $cfg{$type . '_PASSWD'} =~ /^(.*)$/) { + $su_pass = $1; + } + + skip 'No valid SU_PASSWD in config file', $skipped unless $su_pass; + + my $t; ok($t = Net::Telnet::Trango->new(), "Instantiating object"); - ok($t->open($host), "Opening connection to $host"); + ok($t->open($host), "Opening connection to $su"); ok($t->is_connected, "connected");