r642@llin: dpavlin | 2006-05-14 14:43:11 +0200
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 14 May 2006 12:39:39 +0000 (12:39 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 14 May 2006 12:39:39 +0000 (12:39 +0000)
 use new WebPAC::Normalize::Set::data_structure

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

t/6-unit.t

index 27d627c..a17aa4a 100755 (executable)
@@ -90,29 +90,17 @@ foreach my $pos ( 0 ... $isis->size ) {
        diag " row $pos => ",Dumper($row) if ($debug);
 
        my $t = time();
-
-       ok(my $ds = $n->data_structure($row), "data_structure");
-
+       ok(my $ds = $n->data_structure($row), "XML data_structure");
        $t1 += time() - $t;
 
        diag " ds $pos => ",Dumper($ds) if ($debug);
 
        $t = time();
-       my $ds2;
-
-       # TODO move somewhere
-       {
-               no strict 'subs';
-               use WebPAC::Normalize::Set;
-               set_lookup( $lookup->lookup_hash );
-               set_rec( $row );
-               clean_ds();
-               eval "$norm_pl";
-               ok(! $@, $@ ? "error: $@" : "no error");
-               ok($ds2 = get_ds(), "get_ds");
-       
-       }
-
+       ok( my $ds2 = WebPAC::Normalize::Set::data_structure(
+               lookup => $lookup->lookup_hash,
+               row => $row,
+               rules => $norm_pl,
+       ), "Set data_structure");
        $t2 += time() - $t;
 
        diag " ds2 $pos => ",Dumper($ds2) if ($debug);