--- trunk/t/1-lookup.t 2006/05/13 12:07:56 473 +++ trunk/t/1-lookup.t 2006/05/13 13:38:53 478 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 17; +use Test::More tests => 18; use Test::Exception; use blib; @@ -11,6 +11,8 @@ use_ok( 'WebPAC::Lookup' ); } +my $debug = shift @ARGV; + throws_ok { new WebPAC::Lookup( no_log => 1 ) } qr/lookup_file/, "new without lookup_file"; ok(my $lookup = new WebPAC::Lookup( @@ -33,8 +35,12 @@ ok($lookup->add( $rec ), "add"); -ok($lookup->{'_lookup_data'}, "{_lookup_data}"); -ok($lookup->lookup_hash, "lookup_hash"); +ok(my $l1 = $lookup->{_lookup_data}, "{_lookup_data}"); +diag "lookup->{_lookup_data} = ",Dumper($lookup->{_lookup_data}) if ($debug); +ok(my $l2 = $lookup->lookup_hash, "lookup_hash"); +diag "lookup->lookup_hash = ",Dumper($lookup->lookup_hash) if ($debug); + +is_deeply( $l1, $l2, 'lookups same'); my $lookup_res = { '800:foo' => [ 'bar' ],