line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
2081
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1315
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
sub gen { |
4
|
3
|
|
|
3
|
|
17
|
my ($domain) = @_; |
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
|
|
7
|
my $messages; |
7
|
3
|
50
|
|
|
|
14917
|
unless (open(LOCALE, "locale|")) { |
8
|
0
|
|
|
|
|
0
|
doskip(); |
9
|
|
|
|
|
|
|
} |
10
|
3
|
|
|
|
|
2212
|
while () { |
11
|
24
|
100
|
|
|
|
242
|
if (/^LC_MESSAGES=\"(.*)\"$/) { |
|
|
50
|
|
|
|
|
|
12
|
3
|
|
|
|
|
54
|
$messages = $1; |
13
|
3
|
|
|
|
|
53
|
last; |
14
|
|
|
|
|
|
|
} elsif (/^LC_MESSAGES=(.*)$/) { |
15
|
0
|
|
|
|
|
0
|
$messages = $1; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
} |
18
|
3
|
|
|
|
|
219
|
close LOCALE; |
19
|
3
|
50
|
|
|
|
40
|
if ($? != 0) { |
20
|
0
|
|
|
|
|
0
|
doskip(); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
3
|
50
|
|
|
|
64
|
if ($messages eq 'C') { |
24
|
0
|
|
|
|
|
0
|
skip("cannot run test in the C locale", 0); |
25
|
0
|
|
|
|
|
0
|
exit 0; |
26
|
|
|
|
|
|
|
} |
27
|
3
|
50
|
|
|
|
23
|
if ($messages eq 'POSIX') { |
28
|
3
|
|
|
|
|
83
|
skip("cannot run test in the POSIX locale", 0); |
29
|
3
|
|
|
|
|
1994
|
exit 0; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
mkdir "test_data/" . $messages, 0755 unless (-d "test_data/" . $messages); |
33
|
0
|
0
|
|
|
|
|
mkdir "test_data/" . $messages . "/LC_MESSAGES", 0755 |
34
|
|
|
|
|
|
|
unless (-d "test_data/" . $messages . "/LC_MESSAGES"); |
35
|
0
|
0
|
|
|
|
|
unless (-r ("test_data/" . $messages . "/LC_MESSAGES/" . $domain . ".mo")) { |
36
|
0
|
|
|
|
|
|
system "msgfmt", "-o", "test_data/" . $messages . "/LC_MESSAGES/" . |
37
|
|
|
|
|
|
|
$domain . ".mo", |
38
|
|
|
|
|
|
|
"test_data/" . $domain . ".po"; |
39
|
0
|
0
|
|
|
|
|
if ($? != 0) { |
40
|
0
|
|
|
|
|
|
doskip(); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub doskip { |
46
|
0
|
|
|
0
|
|
|
skip("could not generate test data, skipping test", 0); |
47
|
0
|
|
|
|
|
|
exit 0; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |