[BACK]Return to 55-network-add_su-su.t CVS log [TXT][DIR] Up to [local] / trango / Net-Telnet-Trango / t

Diff for /trango/Net-Telnet-Trango/t/55-network-add_su-su.t between version 1.1 and 1.4

version 1.1, 2007/02/06 16:55:43 version 1.4, 2007/02/06 20:43:43
Line 1 
Line 1 
 #!perl -T  #!perl -T
 # $RedRiver: 50-network.t,v 1.5 2007/02/06 00:42:09 andrew Exp $  # $RedRiver: 55-network-add_su-su.t,v 1.3 2007/02/06 17:46:55 andrew Exp $
   
 use Test::More tests => 7;  use Test::More tests => 7;
 use File::Spec;  use File::Spec;
Line 9 
Line 9 
 }  }
   
 diag("Testing Net::Telnet::Trango $Net::Telnet::Trango::VERSION, Perl $], $^X");  diag("Testing Net::Telnet::Trango $Net::Telnet::Trango::VERSION, Perl $], $^X");
 diag("  Generic tests");  diag("  SU tests when adding an SU to an AP");
   
 my $cfg_file = File::Spec->catfile('t', 'tests.cfg');  my $cfg_file = File::Spec->catfile('t', 'tests.cfg');
   
Line 28 
Line 28 
     }      }
   
     my $type = 'AP';      my $type = 'AP';
     my ($host, $pass);      my ($host, $pass, $su, $su_pass, $su_id, $su_mac);
   
     if ($cfg{$type} && $cfg{$type} =~ /^(\d+\.\d+\.\d+.\d+)$/) {      if ($cfg{$type} && $cfg{$type} =~ /^(\d+\.\d+\.\d+.\d+)$/) {
         $host = $1;          $host = $1;
Line 42 
Line 42 
   
     skip 'No valid ' . $type . '_PASSWD in config file', $skipped unless $pass;      skip 'No valid ' . $type . '_PASSWD in config file', $skipped unless $pass;
   
       if ($cfg{SU_ID} && $cfg{SU_ID} =~ /^(\d+)$/) {
           $su_id= $1;
       }
   
       skip 'No valid SU_ID in config file', $skipped unless $su_id;
   
       if ($cfg{SU_MAC} && length $cfg{SU_MAC} >= 12 && $cfg{SU_MAC} =~ /^(.*)$/) {
           $su_mac = $1;
       }
   
       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;      my $t;
     ok($t = Net::Telnet::Trango->new(), "Instantiating object");      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");      ok($t->is_connected, "connected");
   
Line 54 
Line 80 
     ok($t->logged_in, "logged in");      ok($t->logged_in, "logged in");
   
     # XXX Additional tests go here.      # XXX Additional tests go here.
       # XXX Although right now just logging it is all I can think of.
   
     ok($t->bye, "Goodbye");      ok($t->bye, "Goodbye");
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>