[BACK]Return to keyring.t CVS log [TXT][DIR] Up to [local] / palm / Palm-Keyring / t

Diff for /palm/Palm-Keyring/t/keyring.t between version 1.18 and 1.19

version 1.18, 2008/09/18 02:53:27 version 1.19, 2008/09/18 03:02:50
Line 1 
Line 1 
 #!/usr/bin/perl -T  #!/usr/bin/perl -T
 # $RedRiver: keyring.t,v 1.17 2007/09/13 15:41:36 andrew Exp $  # $RedRiver: keyring.t,v 1.18 2008/09/18 01:53:27 andrew Exp $
 use strict;  use strict;
 use warnings;  use warnings;
   
Line 25 
Line 25 
     },      },
 );  );
   
     my $acct = {  my $acct = {
         0 => {      0 => {
             label    => 'name',          label    => 'name',
             label_id => 0,          label_id => 0,
             data     => 'test3',          data     => 'test3',
             font     => 0,          font     => 0,
       },
       1 => {
           label    => 'account',
           label_id => 1,
           data     => 'atestaccount',
           font     => 0,
       },
       2 => {
           label    => 'password',
           label_id => 2,
           data     => $password,
           font     => 0,
       },
       3 => {
           label    => 'lastchange',
           label_id => 3,
           data     => {
               day   => 2,
               month => 2,
               year  => 99,
         },          },
         1 => {          font => 0,
             label    => 'account',      },
             label_id => 1,      255 => {
             data     => 'atestaccount',          label    => 'notes',
             font     => 0,          label_id => 255,
         },          data     => 'now that really roxorZ!',
         2 => {          font     => 0,
             label    => 'password',      },
             label_id => 2,  };
             data     => $password,  
             font     => 0,  
         },  
         3 => {  
             label    => 'lastchange',  
             label_id => 3,  
             data     => {  
                 day   => 2,  
                 month => 2,  
                 year  => 99,  
             },  
             font => 0,  
         },  
         255 => {  
             label    => 'notes',  
             label_id => 255,  
             data     => 'now that really roxorZ!',  
             font     => 0,  
         },  
     };  
   
 foreach my $options (@o) {  foreach my $options (@o) {
     my $pdb;      my $pdb;
Line 102 
Line 102 
   
         $pdb = undef;          $pdb = undef;
   
         ok( $pdb = new Palm::PDB(), 'new Palm::Keyring' );          ok( $pdb = new Palm::Keyring(), 'new Palm::Keyring' );
   
         ok( $pdb->Load($file), 'Load File' );          ok( $pdb->Load($file), 'Load File' );
   
Line 128 
Line 128 
   
         is_deeply( $old_date, $new_date, 'Date didn\'t change' );          is_deeply( $old_date, $new_date, 'Date didn\'t change' );
   
         $acct->{2}->{data} = $new_password;          $decrypted->{2}->{data} = $new_password;
   
         $pdb->{records}->[$rec_num]->{plaintext} = $acct;          $pdb->{records}->[$rec_num]->{plaintext} = $decrypted;
   
         ok( $pdb->Encrypt( $pdb->{'records'}->[$rec_num] ), 'Change record' );          ok( $pdb->Encrypt( $pdb->{'records'}->[$rec_num] ), 'Change record' );
   

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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