--- trunk/t/4-output-tt.t 2005/07/17 11:37:07 16 +++ trunk/t/5-output-tt.t 2005/12/05 17:47:16 212 @@ -16,28 +16,29 @@ ok(my $tt = new WebPAC::Output::TT( include_path => "$abs_path../conf/output/tt", - debug => 1 ), -"new"); + no_log => 1, +), "new"); -my @ds = [ { - 'name' => 'Izvor: ', - 'tag' => 'Source', - 'display' => [ 'foo' ] - }, { - 'name' => 'ID', - 'tag' => 'IDths', - 'swish' => [ 'bar' ], - 'lookup_key' => [ 'bar' ] - }, { +my $ds = { + 'Source' => { + 'name' => 'Izvor: ', + 'tag' => 'Source', + 'display' => [ 'foo' ] + }, + 'ID' => { + 'name' => 'ID', + 'tag' => 'IDths', + 'search' => [ 'bar' ], + 'lookup_key' => [ 'bar' ] + }, 'filename' => [ 'out/thes/001.html' ], 'name' => 'filename', 'tag' => 'filename' - }, -]; +}; throws_ok { $tt->apply( template => 'foo', data => [] ) } qr/error.*foo/, "apply without template"; -cmp_ok(my $text = $tt->apply( template => 'text.tt', data => @ds ), '=~', qr/Source.*foo/, "apply"); +cmp_ok(my $text = $tt->apply( template => 'text.tt', data => $ds ), '=~', qr/Source.*foo/, "apply"); diag $text;