File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -670,6 +670,15 @@ does not include any modules, the L</indexed> property is true.
670
670
671
671
sub set_indexed {
672
672
my ( $self , $meta ) = @_ ;
673
+
674
+ if ( $self -> in_test_directory() ) {
675
+ foreach my $mod ( @{ $self -> module } ) {
676
+ $mod -> indexed(0);
677
+ }
678
+ $self -> indexed(0);
679
+ return ;
680
+ }
681
+
673
682
foreach my $mod ( @{ $self -> module } ) {
674
683
$mod -> indexed(
675
684
$meta -> should_index_package( $mod -> name )
Original file line number Diff line number Diff line change 142
142
is( $file -> level, 2 );
143
143
}
144
144
145
+ {
146
+ my $file = MetaCPAN::Document::File-> new(
147
+ %stub ,
148
+ path => ' foo/t/locker' ,
149
+ module => { name => ' BAR::Locker' }
150
+ );
151
+
152
+ $file -> set_indexed( CPAN::Meta-> new( { name => ' null' , version => 0 } ) );
153
+ is( $file -> module-> [0]-> indexed,
154
+ 0, ' Module in test directory is not indexed' );
155
+ }
156
+
145
157
{
146
158
my $content = <<'END' ;
147
159
package
You can’t perform that action at this time.
0 commit comments