3 # Test that @INC is propogated from the harness process to the test
10 my $sentinel = 'blirpzoffle';
11 local $ENV{PERL5LIB} = $sentinel;
12 my $command = join ' ',
13 map {qq{"$_"}} ( $^X, '-e', 'print join q(:), @INC' );
14 my $path = `$command`;
15 my @got = ( $path =~ /($sentinel)/g );
20 $^O eq 'VMS' ? ( skip_all => 'VMS' )
21 : has_crazy_patch() ? ( skip_all => 'Incompatible @INC patch' )
27 # Change @INC so we ensure it's preserved.
30 my $test_template = <<'END';
33 use Test::More tests => 2;
35 # Make sure we did something sensible with PERL5LIB
36 like $ENV{PERL5LIB}, qr{wibble};
37 ok grep { $_ eq 'wibble' } @INC;
41 open TEST, ">inc_check.t.tmp";
42 printf TEST $test_template, '';
45 open TEST, ">inc_check_taint.t.tmp";
46 printf TEST $test_template, '-T';
48 END { 1 while unlink 'inc_check_taint.t.tmp', 'inc_check.t.tmp'; }
50 for my $test ( 'inc_check_taint.t.tmp', 'inc_check.t.tmp' ) {
51 my ( $tot, $failed ) = Test::Harness::execute_tests( tests => [$test] );