r604@llin: dpavlin | 2006-05-13 14:10:47 +0200
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 13 May 2006 12:08:05 +0000 (12:08 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 13 May 2006 12:08:05 +0000 (12:08 +0000)
 better output, use lookup_hash

git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@474 07558da8-63fa-0310-ba24-9fe276d99e06

t/6-unit.t

index 3ed0af6..dc1431b 100755 (executable)
@@ -10,7 +10,7 @@ use File::Slurp;
 use Data::Dumper;
 use blib;
 
-my $debug = 1;
+my $debug = shift @ARGV;
 
 BEGIN {
 use_ok( 'WebPAC::Lookup' );
@@ -77,6 +77,9 @@ ok(my $out = new WebPAC::Output::TT(
 
 while (my $row = $isis->fetch) {
 
+       diag " row => ",Dumper($row) if ($debug);
+       set_rec( $row );
+
        ok(my $ds = $n->data_structure($row), "data_structure");
 
        diag " ds => ",Dumper($ds) if ($debug);
@@ -85,10 +88,8 @@ while (my $row = $isis->fetch) {
        {
                no strict 'subs';
                use WebPAC::Normalize::Set;
-               diag " row => ",Dumper($row) if ($debug);
-               set_rec( $row );
-               #diag " lookup => ",Dumper($lookup) if ($debug);
-               #set_lookup( $lookup );
+               diag " lookup => ",Dumper($lookup) if ($debug);
+               set_lookup( $lookup->lookup_hash );
                clean_ds();
                eval "$norm_pl";
                ok(! $@, $@ ? "error: $@" : "no error");