File Coverage

blib/lib/Mason/t/Compilation.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Mason::t::Compilation;
2             $Mason::t::Compilation::VERSION = '2.22';
3 1     1   1361 use Test::Class::Most parent => 'Mason::Test::Class';
  1         54716  
  1         8  
4              
5             sub test_pure_perl : Tests {
6             my $self = shift;
7              
8             my $std =
9             sub { my $num = shift; sprintf( 'method main () { my $foo = %s; print $foo; }', $num ) };
10              
11             $self->add_comp( path => '/print1.pl', src => $std->(53) );
12             $self->test_comp(
13             path => '/top1.mp',
14             src => 'method main () { $m->comp("/print1.pl") }',
15             expect => $std->(53),
16             );
17              
18             $self->setup_interp( pure_perl_extensions => ['.pl'] );
19             $self->add_comp( path => '/print2.pl', src => $std->(54) );
20             $self->test_comp( path => '/top2.mp', src => '<& print2.pl &>', expect => '54' );
21              
22             $self->setup_interp( pure_perl_extensions => [] );
23             $self->add_comp( path => '/print3.pl', src => $std->(55) );
24             $self->test_comp(
25             path => '/top3.mp',
26             src => '<& print3.pl &>',
27             expect => $std->(55),
28             );
29             }
30              
31             1;