Skip to content

Commit

Permalink
chaotic behaviour when testing for pod_lines-debug in all releases
Browse files Browse the repository at this point in the history
  • Loading branch information
andreeap committed Mar 22, 2015
1 parent 7da6c9f commit d703b98
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions t/release/badpod.t
Expand Up @@ -37,8 +37,8 @@ sub test_bad_pod {
is $file->sloc, 3, 'sloc';
is $file->slop, 4, 'slop';

p $file->pod_lines;
is_deeply $file->pod_lines, [ [ 5, 7 ], ], 'no pod_lines';
p $file->{pod_lines};
is_deeply $file->{pod_lines}, [ [ 5, 7 ], ], 'no pod_lines';

is ${ $file->pod },

Expand Down
3 changes: 3 additions & 0 deletions t/release/binary-data.t
Expand Up @@ -2,6 +2,7 @@ use Test::More;
use strict;
use warnings;

use DDP;
use lib 't/lib';
use MetaCPAN::TestHelpers;

Expand Down Expand Up @@ -49,6 +50,7 @@ sub test_binary_data {
is $file->sloc, 4, 'sloc';
is $file->slop, 0, 'slop';

p $file->{pod_lines};
is_deeply $file->{pod_lines}, [], 'no pod_lines';

my $binary = $self->file_content($file);
Expand All @@ -63,6 +65,7 @@ sub test_binary_data {
is $file->sloc, 4, 'sloc';
is $file->slop, 7, 'slop';

p $file->{pod_lines};
is_deeply $file->{pod_lines}, [ [ 5, 5 ], [ 22, 6 ], ], 'pod_lines';

my $binary = $self->file_content($file);
Expand Down
2 changes: 2 additions & 0 deletions t/release/local-lib.t
Expand Up @@ -2,6 +2,7 @@ use Test::More;
use strict;
use warnings;

use DDP;
use lib 't/lib';
use MetaCPAN::TestHelpers;

Expand Down Expand Up @@ -37,6 +38,7 @@ test_release(
is $file->sloc, 3, 'sloc';
is $file->slop, 2, 'slop';

p $file->{pod_lines};
is_deeply $file->{pod_lines}, [ [ 4, 3 ] ], 'pod_lines';

is $file->abstract, q[Legitimate module], 'abstract';
Expand Down
4 changes: 3 additions & 1 deletion t/release/oops-locallib.t
Expand Up @@ -2,6 +2,7 @@ use Test::More;
use strict;
use warnings;

use DDP;
use lib 't/lib';
use MetaCPAN::TestHelpers;

Expand Down Expand Up @@ -47,7 +48,8 @@ test_release(
is $file->sloc, 2, 'sloc';
is $file->slop, 2, 'slop';

is_deeply $file->{pod_lines}, [ [ 4, 3 ] ], 'pod_lines';
p $file->{pod_lines} is_deeply $file->{pod_lines},
[ [ 4, 3 ] ], 'pod_lines';

is $file->abstract, q[should not have been included],
'abstract';
Expand Down
2 changes: 2 additions & 0 deletions t/release/pod-with-data-token.t
Expand Up @@ -2,6 +2,7 @@ use Test::More;
use strict;
use warnings;

use DDP;
use lib 't/lib';
use MetaCPAN::TestHelpers;

Expand Down Expand Up @@ -37,6 +38,7 @@ sub test_content {
is $mod->sloc, 5, 'sloc';
is $mod->slop, 17, 'slop';

p $mod->{pod_lines};
is_deeply $mod->{pod_lines},
#<<<
[
Expand Down
2 changes: 2 additions & 0 deletions t/release/pod-with-generator.t
Expand Up @@ -2,6 +2,7 @@ use Test::More;
use strict;
use warnings;

use DDP;
use lib 't/lib';
use MetaCPAN::TestHelpers;

Expand Down Expand Up @@ -37,6 +38,7 @@ sub test_assoc_pod {
is $mod->sloc, 3, 'sloc';
is $mod->slop, 5, 'slop';

p $mod->{pod_lines};
is_deeply $mod->{pod_lines},
[ [ 5, 9 ], ],
'pod lines determined correctly';
Expand Down

0 comments on commit d703b98

Please sign in to comment.