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

Diff for /trango/Net-Telnet-Trango/t/50-network.t-stub between version 1.3 and 1.4

version 1.3, 2007/02/05 21:36:42 version 1.4, 2007/02/05 23:11:21
Line 1 
Line 1 
 #!perl -T  #!perl -T
 # $RedRiver: 50-network.t,v 1.2 2007/02/05 19:39:33 andrew Exp $  # $RedRiver: 50-network.t,v 1.3 2007/02/05 21:36:42 andrew Exp $
   
 use Test::More tests => 2;  use Test::More tests => 7;
 use File::Spec;  use File::Spec;
   
 BEGIN {  BEGIN {
         use_ok( 'Net::Telnet::Trango' );          use_ok( 'Net::Telnet::Trango' );
 }  }
   
 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");
   
 my $cfg_file = File::Spec->catfile('t', 'tests.cfg');  my $cfg_file = File::Spec->catfile('t', 'tests.cfg');
   
 SKIP: {  SKIP: {
       my $skipped = 6;
     my %cfg;      my %cfg;
     if (-e $cfg_file) {      if (-e $cfg_file) {
         if (open my $fh, $cfg_file) {          if (open my $fh, $cfg_file) {
Line 25 
Line 27 
         }          }
     }      }
   
     skip 'No AP or Password in config file', 1      my $type = 'AP';
         unless $cfg{AP} && $cfg{AP_PASSWD};      my ($host, $pass);
   
     ok( sub { return 1 } );      if ($cfg{$type} =~ /^(\d+\.\d+\.\d+.\d+)$/) {
           $host = $1;
       }
   
       skip 'No valid ' . $type . ' in config file',        $skipped unless $host;
   
       if ($cfg{$type . '_PASSWD'} =~ /^(.*)$/) {
           $pass = $1;
       }
   
       skip 'No valid ' . $type . '_PASSWD in config file', $skipped unless $pass;
   
       my $t;
       ok($t = Net::Telnet::Trango->new(), "Instantiating object");
   
       ok($t->open($host), "Opening connection to $host");
   
       ok($t->is_connected(), "connected");
   
       ok($t->login($pass), "Logging in");
   
       ok($t->logged_in(), "logged in");
   
       # XXX Additional tests go here.
   
       ok($t->bye(), "Goodbye");
 }  }

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

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