/[webpac2]/trunk/t/5-output-tt.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/5-output-tt.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 69 by dpavlin, Sun Jul 24 15:03:11 2005 UTC revision 70 by dpavlin, Sat Nov 19 23:48:24 2005 UTC
# Line 19  ok(my $tt = new WebPAC::Output::TT( Line 19  ok(my $tt = new WebPAC::Output::TT(
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          }, {                  'swish' => [ '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    

Legend:
Removed from v.69  
changed lines
  Added in v.70

  ViewVC Help
Powered by ViewVC 1.1.26