1 #!perl -- -*- mode: cperl -*-
5 use CPAN::Testers::ParseReport;
6 use List::Util qw(sum);
13 open my $fh, "<", qq{t/var/nntp-testers/1581994} or die "could not open: $!";
18 CPAN::Testers::ParseReport::parse_report(1234567, $dump, article => $article, solve => 1, quiet => 1);
19 my $keys = keys %{$dump->{"==DATA=="}[0]};
20 ok($keys >= 39, "found at least 39, actually [$keys] keys");
28 'q' => ["meta:perl", "meta:from", "qr:(Undefined.*)", "prereq:Test::More"],
30 'cachedir' => 't/var',
34 CPAN::Testers::ParseReport::parse_distro
39 my $Y = YAML::Syck::LoadFile("ctgetreports.out");
40 my $count = sum map {values %{$Y->{"meta:from"}{$_}}} keys %{$Y->{"meta:from"}};
41 is($count, 130, "found $count==130 reports via meta:from");
42 is($Y->{"meta:ok"}{PASS}{PASS}, 79, "found 79 PASS");
43 is($Y->{"prereq:Test::More"}{0}{PASS}, 70, "found 70 PASS on prereq Test::More==0");
44 ok(!$Y->{"env:alignbytes"}, "there is no such thing as an environment alignbytes");
45 my $undefined = $Y->{'qr:(Undefined.*)'};
46 my($the_warning) = grep {length} keys %$undefined;
47 ok($undefined,"found warning: '$the_warning'");
48 like($the_warning, qr/&main::/, "the ampersand is escaped");
53 open my $fh, "-|", qq{"$^X" "-Ilib" "bin/ctgetreports" "--local" "--cachedir" "t/var" "--solve" "--quiet" "Scriptalicious" 2>&1} or die "could not fork: $!";
56 push @reg, $1 if /^Regression '(.+)'/;
58 is "@reg", "meta:writer mod:Test::Harness id", "found the top 3 candidates";
62 # State after regression testing: 68 results, showing top 3
65 # ****************************************************************
66 # Regression 'mod:Test::Harness'
67 # ****************************************************************
68 # Name Theta StdErr T-stat
69 # [0='const'] 1.0000 0.1021 9.80
70 # [1='eq_2.64'] -0.3846 0.1328 -2.90
71 # [2='eq_3.09'] 0.0000 0.3228 0.00
72 # [3='eq_3.10'] -0.0200 0.1109 -0.18
73 # [4='eq_3.11'] -0.0000 0.2042 -0.00
74 # [5='eq_3.12'] -0.7143 0.1309 -5.46
75 # [6='eq_3.13'] -0.8696 0.1204 -7.22
76 # [7='eq_3.14'] -0.8667 0.1291 -6.71
78 # R^2= 0.628, N= 128, K= 8
79 # ****************************************************************
81 # ****************************************************************
83 # ****************************************************************
84 # Name Theta StdErr T-stat
85 # [0='const'] 2.4992 0.1514 16.51
86 # [1='n_id'] -0.0000 0.0000 -12.66
88 # R^2= 0.560, N= 128, K= 2
89 # ****************************************************************
91 # ****************************************************************
92 # Regression 'meta:date'
93 # ****************************************************************
94 # Name Theta StdErr T-stat
95 # [0='const'] 93.9116 7.3952 12.70
96 # [1='n_meta:date'] -0.0000 0.0000 -12.62
98 # R^2= 0.558, N= 128, K= 2
99 # ****************************************************************
103 # State after regression testing: 110 results, showing top 3
106 # ****************************************************************
107 # Regression 'meta:writer'
108 # ****************************************************************
109 # Name Theta StdErr T-stat
110 # [0='const'] 0.8929 0.0509 17.54
111 # [1='eq_CPAN-Reporter-1.1404'] 0.1071 0.0992 1.08
112 # [2='eq_CPAN-Reporter-1.15'] 0.1071 0.0720 1.49
113 # [3='eq_CPAN-Reporter-1.1556'] -0.8929 0.1440 -6.20
114 # [4='eq_CPAN-Reporter-1.16'] -0.8929 0.2741 -3.26
115 # [5='eq_CPAN-Reporter-1.1601'] -0.6929 0.1308 -5.30
116 # [6='eq_CPAN-Reporter-1.1651'] -0.7679 0.0844 -9.10
117 # [7='eq_CPAN-Reporter-1.17'] -0.6706 0.1032 -6.50
118 # [8='eq_CPAN-Reporter-1.1702'] -0.7817 0.0814 -9.61
119 # [9='eq_CPAN::YACSmoke 0.0307'] 0.1071 0.1032 1.04
121 # R^2= 0.717, N= 128, K= 10
122 # ****************************************************************
124 # ****************************************************************
125 # Regression 'mod:Test::Harness'
126 # ****************************************************************
127 # Name Theta StdErr T-stat
128 # [0='const'] 1.0000 0.1021 9.80
129 # [1='eq_2.64'] -0.3846 0.1328 -2.90
130 # [2='eq_3.09'] 0.0000 0.3228 0.00
131 # [3='eq_3.10'] -0.0200 0.1109 -0.18
132 # [4='eq_3.11'] -0.0000 0.2042 -0.00
133 # [5='eq_3.12'] -0.7143 0.1309 -5.46
134 # [6='eq_3.13'] -0.8696 0.1204 -7.22
135 # [7='eq_3.14'] -0.8667 0.1291 -6.71
137 # R^2= 0.628, N= 128, K= 8
138 # ****************************************************************
140 # ****************************************************************
142 # ****************************************************************
143 # Name Theta StdErr T-stat
144 # [0='const'] 2.4992 0.1514 16.51
145 # [1='n_id'] -0.0000 0.0000 -12.66
147 # R^2= 0.560, N= 128, K= 2
148 # ****************************************************************
153 unlink "ctgetreports.out";
163 # cperl-indent-level: 4