--- trunk/t/6-unit.t 2005/07/24 11:17:44 29 +++ trunk/t/6-unit.t 2005/11/19 23:48:24 70 @@ -2,10 +2,11 @@ use strict; -use Test::More tests => 23; +use Test::More tests => 34; use Test::Exception; use Cwd qw/abs_path/; use File::Temp qw/tempdir/; +use Data::Dumper; use blib; BEGIN { @@ -21,6 +22,7 @@ diag "abs_path: $abs_path"; my $isis_file = "$abs_path../t/winisis/BIBL"; +$isis_file = '/data/hidra/THS/THS'; diag "isis_file: $isis_file"; @@ -30,6 +32,7 @@ ok(my $isis = new WebPAC::Input::ISIS( code_page => 'ISO-8859-2', # application encoding + limit_mfn => 10, ), "new Input::ISIS"); ok(my $maxmfn = $isis->open( @@ -47,6 +50,7 @@ # filter => { 'foo' => sub { shift } }, db => $db, lookup_regex => $lookup->regex, + lookup => $lookup, ), "new Normalize::XML"); ok($n->open( @@ -61,14 +65,17 @@ while (my $row = $isis->fetch) { - ok(my @ds = $n->data_structure($row), "data_structure"); + ok(my $ds = $n->data_structure($row), "data_structure"); -use Data::Dumper; -print Dumper(\@ds); +# diag Dumper($ds); - ok($out->apply( + ok(my $html = $out->apply( template => 'html.tt', - data => @ds, + data => $ds, ), "apply"); + $html =~ s#\s*[\n\r]+\s*##gs; + + diag $html; + };