#!/usr/bin/perl -w
use strict;
-use Test::More tests => 17;
+use Test::More tests => 18;
use Test::Exception;
use blib;
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(
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' ],