line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::PPPort; |
2
|
5
|
|
|
5
|
|
5560
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
195
|
|
3
|
5
|
|
|
5
|
|
27
|
use warnings; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
408
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
require Test::More; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $Test = Test::More->builder; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
11
|
5
|
|
|
5
|
|
26
|
my $self = shift; |
12
|
5
|
|
|
|
|
11
|
my $caller = caller; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
{ |
15
|
5
|
|
|
5
|
|
25
|
no strict 'refs'; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
1397
|
|
|
5
|
|
|
|
|
10
|
|
16
|
5
|
|
|
|
|
13
|
*{"$caller\::ppport_ok"} = \&ppport_ok; |
|
5
|
|
|
|
|
27
|
|
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
5
|
|
|
|
|
23
|
$Test->exported_to($caller); |
20
|
5
|
|
|
|
|
47
|
$Test->plan(@_); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub ppport_ok { |
24
|
4
|
100
|
|
4
|
0
|
301
|
unless (-f 'ppport.h') { |
25
|
1
|
|
|
|
|
7
|
$Test->skip_all('No such ppport.h file'); |
26
|
1
|
|
|
|
|
697
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
3
|
|
|
|
|
11
|
my $cmd = "$^X ppport.h"; |
30
|
3
|
|
|
|
|
487736
|
my @result = `$cmd 2>&1`; |
31
|
3
|
100
|
|
|
|
284
|
if ($result[0] =~ /^No input files given/) { |
32
|
1
|
|
|
|
|
38
|
$Test->skip_all( "No such XS files"); |
33
|
|
|
|
|
|
|
} else { |
34
|
2
|
|
|
|
|
77
|
$Test->plan( tests => 1 ); |
35
|
2
|
100
|
|
|
|
1914
|
if ($result[-1] =~ /^Looks good/) { |
36
|
1
|
|
|
|
|
15
|
$Test->ok( 1, $cmd); |
37
|
|
|
|
|
|
|
} else { |
38
|
1
|
|
|
|
|
16
|
$Test->ok( 0, $cmd); |
39
|
1
|
|
|
|
|
443
|
$Test->diag("\nppport.h result:\n@result\n"); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
__END__ |