From: Dobrica Pavlinusic Date: Sun, 24 Jul 2005 15:35:46 +0000 (+0000) Subject: fix X-Git-Url: http://git.rot13.org/?p=webpac2;a=commitdiff_plain;h=6f5d6a7c1a9c1d4c62b0e81db24cb3a7dcb6e8cd fix git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@33 07558da8-63fa-0310-ba24-9fe276d99e06 --- diff --git a/conf/output/tt/html.tt b/conf/output/tt/html.tt index 19c596b..b70c28b 100644 --- a/conf/output/tt/html.tt +++ b/conf/output/tt/html.tt @@ -16,7 +16,7 @@ [% IF (d.tag == 'BroaderTerm' || d.tag == 'NarrowerTerm' || d.tag == 'RelatedTerm') ; '' ; - ELSE ; d.display.join(" ") | CROVOC_img ; END + ELSE ; d.display.join(" ") ; END -%] diff --git a/lib/WebPAC/Output/TT.pm b/lib/WebPAC/Output/TT.pm index 1f34bff..0582fb8 100644 --- a/lib/WebPAC/Output/TT.pm +++ b/lib/WebPAC/Output/TT.pm @@ -69,7 +69,7 @@ Create output from in-memory data structure using Template Toolkit template. my $text = $tt->apply( template => 'text.tt', - data => @ds + data => \@ds ); =cut @@ -104,7 +104,7 @@ to a file. $tt->to_file( file => 'out.txt', template => 'text.tt', - data => @ds + data => \@ds ); =cut diff --git a/t/6-unit.t b/t/6-unit.t index 228b566..cac9e66 100755 --- a/t/6-unit.t +++ b/t/6-unit.t @@ -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 { @@ -66,12 +67,15 @@ while (my $row = $isis->fetch) { 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; + };