--- trunk/t/5-output-tt.t 2005/11/19 23:48:19 69 +++ trunk/t/5-output-tt.t 2005/11/19 23:48:24 70 @@ -19,25 +19,26 @@ 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', + 'swish' => [ '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;