fix
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 24 Jul 2005 15:35:46 +0000 (15:35 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 24 Jul 2005 15:35:46 +0000 (15:35 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@33 07558da8-63fa-0310-ba24-9fe276d99e06

conf/output/tt/html.tt
lib/WebPAC/Output/TT.pm
t/6-unit.t

index 19c596b..b70c28b 100644 (file)
@@ -16,7 +16,7 @@
  <td>
 [%
                        IF (d.tag == 'BroaderTerm' || d.tag == 'NarrowerTerm' || d.tag == 'RelatedTerm') ; '<ul><li>' ; d.display.sort.join("</li><li>") | CROVOC_img ; '</li></ul>' ;
-                       ELSE ; d.display.join(" ") | CROVOC_img ; END
+                       ELSE ; d.display.join(" ") ; END
 -%]
  </td>
 </tr>
index 1f34bff..0582fb8 100644 (file)
@@ -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
index 228b566..cac9e66 100755 (executable)
@@ -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;
+
 };