3 # Test that PERL5LIB is propogated from the harness process to the test
10 my $path_sep = $Config{path_sep};
13 my $sentinel = 'blirpzoffle';
14 local $ENV{PERL5LIB} = $sentinel;
15 my $command = join ' ',
16 map {qq{"$_"}} ( $^X, '-e', 'print join q(:), @INC' );
17 my $path = `$command`;
18 my @got = ( $path =~ /($sentinel)/g );
23 $^O eq 'VMS' ? ( skip_all => 'VMS' )
24 : has_crazy_patch() ? ( skip_all => 'Incompatible @INC patch' )
31 # Change PERL5LIB so we ensure it's preserved.
32 $ENV{PERL5LIB} = join(
34 ( $ENV{PERL_CORE} ? '../lib' : () ), $ENV{PERL5LIB} || ''
37 open TEST, ">perl5lib_check.t.tmp";
41 use Test::More tests => 1;
42 like \$ENV{PERL5LIB}, qr/(^|${path_sep})wibble${path_sep}/;
46 END { 1 while unlink 'perl5lib_check.t.tmp'; }
48 my $h = TAP::Harness->new( { lib => ['something'], verbosity => -3 } );
49 ok( !$h->runtests('perl5lib_check.t.tmp')->has_errors );