2 |
use strict; |
use strict; |
3 |
use warnings; |
use warnings; |
4 |
|
|
5 |
use Test::More tests => 25; |
use Test::More tests => 27; |
6 |
use lib 'lib'; |
use lib 'lib'; |
7 |
|
|
8 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
34 |
|
|
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' ); |
ok( $o->add_head( "<!--\nhead comment\n-->" ), 'add_head comment' ); |
39 |
|
ok( $o->add_head( "<span>head html</span>>" ), 'add_head html' ); |
40 |
|
|
41 |
ok( my $html = $o->page( title => 'Test', body => '<!-- in-body -->' ), 'page' ); |
ok( my $html = $o->page( title => 'Test', body => '<!-- in-body -->' ), 'page' ); |
42 |
diag $html if $debug; |
diag $html if $debug; |
43 |
|
|
44 |
like( $html, qr{text/javascript.*\.js}, 'have js' ); |
like( $html, qr{text/javascript.*\.js}, 'have js' ); |
45 |
like( $html, qr{text/css.*\.css}, 'have css' ); |
like( $html, qr{text/css.*\.css}, 'have css' ); |
46 |
|
like( $html, qr{head comment}, 'have comment' ); |
47 |
like( $html, qr{head html}, 'have html' ); |
like( $html, qr{head html}, 'have html' ); |
48 |
like( $html, qr{icon}, 'have icon' ); |
like( $html, qr{icon}, 'have icon' ); |
49 |
|
|