3 use Test::More tests => 5;
10 use_ok( 'WebPAC::Output::TT' );
13 ok(my $abs_path = abs_path($0), "abs_path");
14 $abs_path =~ s#/[^/]*$#/#;
15 diag "abs_path: $abs_path";
17 ok(my $tt = new WebPAC::Output::TT(
18 include_path => "$abs_path../conf/output/tt",
26 'display' => [ 'foo' ]
31 'search' => [ 'bar' ],
32 'lookup_key' => [ 'bar' ]
34 'filename' => [ 'out/thes/001.html' ],
39 throws_ok { $tt->apply( template => 'foo', data => [] ) } qr/error.*foo/, "apply without template";
41 cmp_ok(my $text = $tt->apply( template => 'text.tt', data => $ds ), '=~', qr/Source.*foo/, "apply");