--- trunk/t/1-lookup.t 2005/07/16 14:44:38 6 +++ trunk/t/1-lookup.t 2005/07/16 16:00:19 7 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 6; +use Test::More tests => 15; use Test::Exception; use blib; @@ -26,9 +26,9 @@ '900' => [ 'bar' ], }; -ok($lookup->add( $rec ), "add"); +diag "testing WebPAC::Lookup own methods"; -print Dumper($lookup); +ok($lookup->add( $rec ), "add"); ok($lookup->{'lookup'}, "have lookup hash"); @@ -40,3 +40,12 @@ is_deeply($lookup_res, $lookup->{'lookup'}, "lookup data"); +foreach my $k (keys %{ $lookup_res }) { + ok(my @l = $lookup->lookup("lookup{$k}"), "lookup{$k}"); + + cmp_ok($#l, '==', $#{$lookup_res->{$k}}, "result size"); + + is_deeply($lookup_res->{$k}, \@l, "result values"); +} + +diag "testing WebPAC::Lookup inherited methods";