line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mason::t::CompCalls; |
2
|
|
|
|
|
|
|
$Mason::t::CompCalls::VERSION = '2.23'; |
3
|
1
|
|
|
1
|
|
1027
|
use Test::Class::Most parent => 'Mason::Test::Class'; |
|
1
|
|
|
|
|
30147
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub test_ampersand : Tests { |
6
|
1
|
|
|
1
|
0
|
720
|
my $self = shift; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
|
|
11
|
$self->add_comp( |
9
|
|
|
|
|
|
|
path => '/support/amper_test.mi', |
10
|
|
|
|
|
|
|
src => <<'EOF', |
11
|
|
|
|
|
|
|
amper_test.<p> |
12
|
|
|
|
|
|
|
% if (%{$self->args}) { |
13
|
|
|
|
|
|
|
Arguments:<p> |
14
|
|
|
|
|
|
|
% foreach my $key (sort keys %{$self->args}) { |
15
|
|
|
|
|
|
|
<b><% $key %></b>: <% $self->args->{$key} %><br> |
16
|
|
|
|
|
|
|
% } |
17
|
|
|
|
|
|
|
% } |
18
|
|
|
|
|
|
|
EOF |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
9
|
$self->test_comp( |
22
|
|
|
|
|
|
|
path => '/support/amper_call.mc', |
23
|
|
|
|
|
|
|
src => <<'EOF', |
24
|
|
|
|
|
|
|
<&/support/amper_test.mi&> |
25
|
|
|
|
|
|
|
<& amper_test.mi &> |
26
|
|
|
|
|
|
|
<& amper_test.mi, &> |
27
|
|
|
|
|
|
|
<& /support/amper_test.mi |
28
|
|
|
|
|
|
|
&> |
29
|
|
|
|
|
|
|
<& |
30
|
|
|
|
|
|
|
amper_test.mi &> |
31
|
|
|
|
|
|
|
<& |
32
|
|
|
|
|
|
|
/support/amper_test.mi |
33
|
|
|
|
|
|
|
&> |
34
|
|
|
|
|
|
|
EOF |
35
|
|
|
|
|
|
|
expect => <<'EOF', |
36
|
|
|
|
|
|
|
amper_test.<p> |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
amper_test.<p> |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
amper_test.<p> |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
amper_test.<p> |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
amper_test.<p> |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
amper_test.<p> |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
EOF |
49
|
|
|
|
|
|
|
); |
50
|
1
|
|
|
|
|
7
|
$self->test_comp( |
51
|
|
|
|
|
|
|
src => <<'EOF', |
52
|
|
|
|
|
|
|
<& /support/amper_test.mi, message=>'Hello World!' &> |
53
|
|
|
|
|
|
|
<& support/amper_test.mi, message=>'Hello World!', |
54
|
|
|
|
|
|
|
to=>'Joe' &> |
55
|
|
|
|
|
|
|
<& "support/amper_test.mi" &> |
56
|
|
|
|
|
|
|
% my $dir = "support"; |
57
|
|
|
|
|
|
|
% my %args = (a=>17, b=>32); |
58
|
|
|
|
|
|
|
<& $dir . "/amper_test.mi", %args &> |
59
|
|
|
|
|
|
|
EOF |
60
|
|
|
|
|
|
|
expect => <<'EOF', |
61
|
|
|
|
|
|
|
amper_test.<p> |
62
|
|
|
|
|
|
|
Arguments:<p> |
63
|
|
|
|
|
|
|
<b>message</b>: Hello World!<br> |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
amper_test.<p> |
66
|
|
|
|
|
|
|
Arguments:<p> |
67
|
|
|
|
|
|
|
<b>message</b>: Hello World!<br> |
68
|
|
|
|
|
|
|
<b>to</b>: Joe<br> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
amper_test.<p> |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
amper_test.<p> |
73
|
|
|
|
|
|
|
Arguments:<p> |
74
|
|
|
|
|
|
|
<b>a</b>: 17<br> |
75
|
|
|
|
|
|
|
<b>b</b>: 32<br> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
EOF |
78
|
|
|
|
|
|
|
); |
79
|
1
|
|
|
1
|
|
200
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
1; |