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

Diff for /trango/Net-Telnet-Trango/t/51-network-add_su-ap.t between version 1.5 and 1.6

version 1.5, 2007/02/06 17:40:02 version 1.6, 2007/02/06 19:06:13
Line 1 
Line 1 
 #!perl -T  #!perl -T
 # $RedRiver: 51-network-add_su-ap.t,v 1.4 2007/02/06 16:52:21 andrew Exp $  # $RedRiver: 51-network-add_su-ap.t,v 1.5 2007/02/06 17:40:02 andrew Exp $
   
 use Test::More tests => 12;  use Test::More tests => 16;
 use File::Spec;  use File::Spec;
   
 BEGIN {  BEGIN {
Line 12 
Line 12 
 diag("  AP tests when adding an SU to an AP");  diag("  AP 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');
 my ($cir, $mir) = (128, 256);  my ($cir, $mir, $new_mir) = (128, 256, 1024);
   
 SKIP: {  SKIP: {
     my $skipped = 11;      my $skipped = 15;
     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 101 
Line 101 
         diag('ERR: ' . $t->last_error);          diag('ERR: ' . $t->last_error);
     }      }
   
     if ( (! ok($t->save_sudb, "Saving sudb"))  
       && $t->last_error ) {  
         diag('ERR: ' . $t->last_error);  
     }  
   
     $sudb = [];      $sudb = [];
     if ((!ok($sudb = $t->sudb_view, "Getting sudb"))      if ((!ok($sudb = $t->sudb_view, "Getting sudb"))
       && $t->last_error ) {        && $t->last_error ) {
Line 128 
Line 123 
     }      }
   
     is($in_sudb, 1, "Correct SU is in SUDB");      is($in_sudb, 1, "Correct SU is in SUDB");
   
       if ( (! ok($t->save_sudb, "Saving sudb"))
         && $t->last_error ) {
           diag('ERR: ' . $t->last_error);
       }
   
   
       if ( (! ok($t->sudb_modify($su_id, 'mir', $new_mir), "modifying su mir"))
         && $t->last_error ) {
           diag('ERR: ' . $t->last_error);
       }
   
       $sudb = [];
       if ((!ok($sudb = $t->sudb_view, "Getting sudb"))
         && $t->last_error ) {
           diag('ERR: ' . $t->last_error);
       }
   
       $su_mir = 0;
       foreach my $su (@{ $sudb }) {
           if ($su_id == $su->{suid}) {
               $su_mir = $su->{mir};
               last;
           }
       }
   
       is($new_mir, $su_mir, "SU has new mir");
   
       if ( (! ok($t->save_sudb, "Saving sudb"))
         && $t->last_error ) {
           diag('ERR: ' . $t->last_error);
       }
   
     ok($t->bye, "Goodbye");      ok($t->bye, "Goodbye");
 }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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