1N/A#!./perl -IFoo::Bar -IBla
1N/A
1N/ABEGIN {
1N/A chdir 't' if -d 't';
1N/A unshift @INC, '../lib';
1N/A require './test.pl'; # for which_perl() etc
1N/A}
1N/A
1N/ABEGIN {
1N/A plan(4);
1N/A}
1N/A
1N/Amy $Is_MacOS = $^O eq 'MacOS';
1N/Amy $Is_VMS = $^O eq 'VMS';
1N/Amy $lib;
1N/A
1N/A$lib = $Is_MacOS ? ':Bla:' : 'Bla';
1N/Aok(grep { $_ eq $lib } @INC);
1N/ASKIP: {
1N/A skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
1N/A $lib = $Is_MacOS ? 'Foo::Bar:' : 'Foo::Bar';
1N/A ok(grep { $_ eq $lib } @INC);
1N/A}
1N/A
1N/A$lib = $Is_MacOS ? ':Bla2:' : 'Bla2';
1N/Afresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib,
1N/A { switches => ['-IBla2'] }, '-I');
1N/ASKIP: {
1N/A skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
1N/A $lib = $Is_MacOS ? 'Foo::Bar2:' : 'Foo::Bar2';
1N/A fresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib,
1N/A { switches => ['-IFoo::Bar2'] }, '-I with colons');
1N/A}