/[Frey]/branches/zimbardo/t/02-Frey-Web.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 /branches/zimbardo/t/02-Frey-Web.t

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

revision 161 by dpavlin, Thu Jul 17 19:33:51 2008 UTC revision 476 by dpavlin, Thu Nov 20 12:56:37 2008 UTC
# Line 2  Line 2 
2  use strict;  use strict;
3  use warnings;  use warnings;
4    
5  use Test::More tests => 18;  use Test::More tests => 24;
6  use lib 'lib';  use lib 'lib';
7    
8  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
# Line 35  ok( my @head = $o->head, 'js' ); Line 35  ok( my @head = $o->head, 'js' );
35  diag dump( @head ) if $debug;  diag dump( @head ) if $debug;
36    
37  ok( $o->add_head( '/static/introspect.css' ), 'add_head css' );  ok( $o->add_head( '/static/introspect.css' ), 'add_head css' );
38    ok( $o->add_head( "<!--\nhead html\n-->" ),     'add_head html' );
39    
40  ok( my $html = $o->page( title => 'Test', body => '<!-- in-body -->' ), 'page' );  ok( my $html = $o->page( title => 'Test', body => '<!-- in-body -->' ), 'page' );
41  diag $html if $debug;  diag $html if $debug;
42    
43  like( $html, qr{text/javascript.*\.js}, 'have js' );  like( $html, qr{text/javascript.*\.js}, 'have js' );
44  like( $html, qr{text/css.*\.css}, 'have css' );  like( $html, qr{text/css.*\.css}, 'have css' );
45    like( $html, qr{head html}, 'have html' );
46    
47  html_ok( $html, 'html lint' );  html_ok( $html, 'html lint' );
48    
# Line 49  diag $s if $debug; Line 51  diag $s if $debug;
51  ok( $s = $o->add_head( 'static/js/ext-2.1/ext-all.js' ), 'add_head js' );  ok( $s = $o->add_head( 'static/js/ext-2.1/ext-all.js' ), 'add_head js' );
52  diag $s if $debug;  diag $s if $debug;
53    
54    ok( $o->title, 'has title' );
55    
56  ok( my $html2 = $o->page( title => 'Test2', body => '<!-- in-body 2 -->' ), 'page' );  ok( my $html2 = $o->page( title => 'Test2', body => '<!-- in-body 2 -->' ), 'page' );
57  diag $html2 if $debug;  diag $html2 if $debug;
58    
# Line 56  cmp_ok( length( $html ), '<', length( $h Line 60  cmp_ok( length( $html ), '<', length( $h
60    
61  like( $html2, qr{frey\.css}, 'have css' );  like( $html2, qr{frey\.css}, 'have css' );
62  like( $html2, qr{ext}, 'have js' );  like( $html2, qr{ext}, 'have js' );
63    
64    ok( my $error = $o->error('test,ignore'), 'error' );
65    diag $error if $debug;
66    like( $error, qr{test,ignore.*$0}s, "have $0" );
67    
68    ok( $o->dump_max_bytes, 'dump_max_bytes' );

Legend:
Removed from v.161  
changed lines
  Added in v.476

  ViewVC Help
Powered by ViewVC 1.1.26