10 |
use Data::Dumper; |
use Data::Dumper; |
11 |
use blib; |
use blib; |
12 |
|
|
13 |
my $debug = 1; |
my $debug = shift @ARGV; |
14 |
|
|
15 |
BEGIN { |
BEGIN { |
16 |
use_ok( 'WebPAC::Lookup' ); |
use_ok( 'WebPAC::Lookup' ); |
26 |
diag "abs_path: $abs_path" if ($debug); |
diag "abs_path: $abs_path" if ($debug); |
27 |
|
|
28 |
my $isis_file = "$abs_path../t/winisis/BIBL"; |
my $isis_file = "$abs_path../t/winisis/BIBL"; |
29 |
$isis_file = '/data/hidra/THS/THS'; |
#$isis_file = '/data/hidra/THS/THS'; |
30 |
|
$isis_file = '/data/isis_data/ffkk/'; |
31 |
|
|
32 |
diag "isis_file: $isis_file" if ($debug); |
diag "isis_file: $isis_file" if ($debug); |
33 |
|
|
76 |
filters => { foo => sub { shift } }, |
filters => { foo => sub { shift } }, |
77 |
), "new Output::TT"); |
), "new Output::TT"); |
78 |
|
|
79 |
|
diag " lookup => ",Dumper($lookup->lookup_hash) if ($debug); |
80 |
|
|
81 |
while (my $row = $isis->fetch) { |
while (my $row = $isis->fetch) { |
82 |
|
|
83 |
|
diag " row => ",Dumper($row) if ($debug); |
84 |
|
set_rec( $row ); |
85 |
|
|
86 |
ok(my $ds = $n->data_structure($row), "data_structure"); |
ok(my $ds = $n->data_structure($row), "data_structure"); |
87 |
|
|
88 |
diag " ds => ",Dumper($ds) if ($debug); |
diag " ds => ",Dumper($ds) if ($debug); |
91 |
{ |
{ |
92 |
no strict 'subs'; |
no strict 'subs'; |
93 |
use WebPAC::Normalize::Set; |
use WebPAC::Normalize::Set; |
94 |
diag " row => ",Dumper($row) if ($debug); |
set_lookup( $lookup->lookup_hash ); |
|
set_rec( $row ); |
|
|
#diag " lookup => ",Dumper($lookup) if ($debug); |
|
|
#set_lookup( $lookup ); |
|
95 |
clean_ds(); |
clean_ds(); |
96 |
eval "$norm_pl"; |
eval "$norm_pl"; |
97 |
ok(! $@, $@ ? "error: $@" : "no error"); |
ok(! $@, $@ ? "error: $@" : "no error"); |