=================================================================== RCS file: /cvs/palm/Palm-Keyring/t/keyring5-samples.t,v retrieving revision 1.4 retrieving revision 1.6 diff -u -r1.4 -r1.6 --- palm/Palm-Keyring/t/keyring5-samples.t 2007/02/27 17:08:05 1.4 +++ palm/Palm-Keyring/t/keyring5-samples.t 2007/09/13 16:44:39 1.6 @@ -1,5 +1,5 @@ #!/usr/bin/perl -T -# $RedRiver: keyring5-samples.t,v 1.3 2007/02/23 22:05:17 andrew Exp $ +# $RedRiver: keyring5-samples.t,v 1.5 2007/08/10 04:13:31 andrew Exp $ use strict; use warnings; @@ -10,14 +10,20 @@ my $password = 'abc'; my $orig_recs = [ - [ - { + { + 0 => { + 'label_id' => 0, + 'data' => '', + 'label' => 'name', + 'font' => 0, + }, + 2 => { 'label_id' => 2, 'data' => 'only password is set', 'label' => 'password', 'font' => 0 }, - { + 3 => { 'label_id' => 3, 'data' => { 'month' => 1, @@ -27,21 +33,27 @@ 'label' => 'lastchange', 'font' => 0 } - ], - [ - { + }, + { + 0 => { + 'label_id' => 0, + 'data' => 'hoenicke', + 'label' => 'name', + 'font' => 0, + }, + 1 => { 'label_id' => 1, 'data' => 'test', 'label' => 'account', 'font' => 0 }, - { + 2 => { 'label_id' => 2, 'data' => 'abcd1234', 'label' => 'password', 'font' => 0 }, - { + 3 => { 'label_id' => 3, 'data' => { 'month' => 1, @@ -51,21 +63,27 @@ 'label' => 'lastchange', 'font' => 0 }, - { + 255 => { 'label_id' => 255, 'data' => 'This is a short note.', 'label' => 'notes', 'font' => 0 } - ], - [ - { + }, + { + 0 => { + 'label_id' => 0, + 'data' => 'name', + 'label' => 'name', + 'font' => 0, + }, + 2 => { 'label_id' => 2, 'data' => 'password (date is 2/2/07)', 'label' => 'password', 'font' => 0 }, - { + 3 => { 'label_id' => 3, 'data' => { 'month' => 1, @@ -75,23 +93,24 @@ 'label' => 'lastchange', 'font' => 0 } - ] + } ]; foreach my $file ('Keys-None.pdb', 'Keys-3DES.pdb', 'Keys-AES.pdb', 'Keys-AES256.pdb') { my $pdb; ok( $pdb = new Palm::PDB, 'new Palm::PDB' ); ok( $pdb->Load('t/' . $file), "Loading '$file'" ); + my $Num_Tests_Left = 5; SKIP: { - skip 'Digest::HMAC_SHA1 not installed', 5 unless - eval " require Digest::HMAC_SHA1 "; + skip 'Digest::HMAC_SHA1 not installed', $Num_Tests_Left + unless eval "require Digest::HMAC_SHA1"; if ($pdb->{appinfo}->{cipher} > 0) { my $crypt = Palm::Keyring::crypts($pdb->{appinfo}->{cipher}); - skip 'Crypt::CBC not installed', 5 unless - eval "require Crypt::CBC"; - skip 'Crypt::' . $crypt->{name} . ' not installed', 5 unless - eval "require Crypt::$crypt->{name}"; + skip 'Crypt::CBC not installed', $Num_Tests_Left + unless eval "require Crypt::CBC"; + skip 'Crypt::' . $crypt->{name} . ' not installed', $Num_Tests_Left + unless eval "require Crypt::$crypt->{name}"; } $password = 'abc';