line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
1377
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
2
|
1
|
|
|
1
|
|
3
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
53
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package MarpaX::Languages::C::AST::Expected; |
5
|
1
|
|
|
1
|
|
4
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
6
|
1
|
|
|
1
|
|
401
|
use IO::File; |
|
1
|
|
|
|
|
5405
|
|
|
1
|
|
|
|
|
91
|
|
7
|
1
|
|
|
1
|
|
5
|
use File::Basename; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
8
|
1
|
|
|
1
|
|
4
|
use File::Spec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
205
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub value { |
11
|
0
|
|
|
0
|
0
|
|
my ($class, $got) = @_; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
my ($filename, $directories, $suffix) = fileparse($0, qr/\.[^.]*/); |
14
|
0
|
|
|
|
|
|
my $datafilename = File::Spec->catfile($directories, "$filename.data"); |
15
|
0
|
0
|
0
|
|
|
|
if ($ENV{RELEASE_TESTING} || 0) { |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
# Untaint $datafilename |
18
|
|
|
|
|
|
|
# |
19
|
0
|
|
|
|
|
|
($datafilename) = $datafilename =~ /^(.*)$/; |
20
|
0
|
|
|
|
|
|
my $fh = IO::File->new($datafilename, 'w'); |
21
|
0
|
|
|
|
|
|
my $d = Data::Dumper->new([$got]); |
22
|
0
|
|
|
|
|
|
$d->Purity(1)->Terse(1)->Deepcopy(1); |
23
|
0
|
|
|
|
|
|
print $fh $d->Dump; |
24
|
0
|
|
|
|
|
|
undef $fh; |
25
|
|
|
|
|
|
|
} |
26
|
0
|
|
|
|
|
|
my $fh = IO::File->new($datafilename, 'r'); |
27
|
0
|
|
|
|
|
|
$fh->untaint; |
28
|
0
|
|
|
|
|
|
my $data = do { local $/; <$fh> }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
undef $fh; |
30
|
0
|
|
|
|
|
|
my $expected = eval $data; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
return $expected; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |