<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>
my $text = $tt->apply(
template => 'text.tt',
- data => @ds
+ data => \@ds
);
=cut
$tt->to_file(
file => 'out.txt',
template => 'text.tt',
- data => @ds
+ data => \@ds
);
=cut
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 {
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;
+
};