19 |
no_log => 1, |
no_log => 1, |
20 |
), "new"); |
), "new"); |
21 |
|
|
22 |
my @ds = [ { |
my $ds = { |
23 |
'name' => 'Izvor: ', |
'Source' => { |
24 |
'tag' => 'Source', |
'name' => 'Izvor: ', |
25 |
'display' => [ 'foo' ] |
'tag' => 'Source', |
26 |
}, { |
'display' => [ 'foo' ] |
27 |
'name' => 'ID', |
}, |
28 |
'tag' => 'IDths', |
'ID' => { |
29 |
'swish' => [ 'bar' ], |
'name' => 'ID', |
30 |
'lookup_key' => [ 'bar' ] |
'tag' => 'IDths', |
31 |
}, { |
'search' => [ 'bar' ], |
32 |
|
'lookup_key' => [ 'bar' ] |
33 |
|
}, |
34 |
'filename' => [ 'out/thes/001.html' ], |
'filename' => [ 'out/thes/001.html' ], |
35 |
'name' => 'filename', |
'name' => 'filename', |
36 |
'tag' => 'filename' |
'tag' => 'filename' |
37 |
}, |
}; |
|
]; |
|
38 |
|
|
39 |
throws_ok { $tt->apply( template => 'foo', data => [] ) } qr/error.*foo/, "apply without template"; |
throws_ok { $tt->apply( template => 'foo', data => [] ) } qr/error.*foo/, "apply without template"; |
40 |
|
|
41 |
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"); |
42 |
|
|
43 |
diag $text; |
diag $text; |
44 |
|
|