/[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 948 by dpavlin, Mon Dec 5 17:47:16 2005 UTC revision 949 by dpavlin, Thu Nov 1 00:16:48 2007 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
 use Test::More tests => 5;  
 use Test::Exception;  
 use Cwd qw/abs_path/;  
 use blib;  
3  use strict;  use strict;
4    use blib;
5    
6    use Test::More tests => 5;
7    
8  BEGIN {  BEGIN {
9    use_ok( 'WebPAC::Test' );
10  use_ok( 'WebPAC::Output::TT' );  use_ok( 'WebPAC::Output::TT' );
11  }  }
12    
 ok(my $abs_path = abs_path($0), "abs_path");  
 $abs_path =~ s#/[^/]*$#/#;  
 diag "abs_path: $abs_path";  
   
13  ok(my $tt = new WebPAC::Output::TT(  ok(my $tt = new WebPAC::Output::TT(
14          include_path => "$abs_path../conf/output/tt",          include_path => "$abs_path../conf/output/tt",
15          no_log => 1,          %LOG
16  ), "new");  ), "new");
17    
18  my $ds = {  my $ds = {
# Line 40  throws_ok { $tt->apply( template => 'foo Line 36  throws_ok { $tt->apply( template => 'foo
36    
37  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");
38    
39  diag $text;  diag $text if $debug;
40    

Legend:
Removed from v.948  
changed lines
  Added in v.949

  ViewVC Help
Powered by ViewVC 1.1.26