Commit | Line | Data |
---|---|---|
574c798a SR |
1 | #!./perl -IFoo::Bar -IBla |
2 | ||
3 | BEGIN { | |
4 | chdir 't' if -d 't'; | |
5 | unshift @INC, '../lib'; | |
6 | require './test.pl'; # for which_perl() etc | |
574c798a SR |
7 | plan(4); |
8 | } | |
9 | ||
63c6dcc1 JH |
10 | my $Is_VMS = $^O eq 'VMS'; |
11 | my $lib; | |
12 | ||
7b903762 | 13 | $lib = 'Bla'; |
610466d9 | 14 | ok do { grep { $_ eq $lib } @INC[0..($#INC-1)] }, 'Identified entry in @INC'; |
143a3e5e | 15 | SKIP: { |
63c6dcc1 | 16 | skip 'Double colons not allowed in dir spec', 1 if $Is_VMS; |
7b903762 | 17 | $lib = 'Foo::Bar'; |
610466d9 JK |
18 | ok do { grep { $_ eq $lib } @INC[0..($#INC-1)] }, |
19 | 'Identified entry in @INC with double colons'; | |
143a3e5e | 20 | } |
574c798a | 21 | |
7b903762 | 22 | $lib = 'Bla2'; |
20189146 | 23 | fresh_perl_is("print grep { \$_ eq '$lib' } \@INC[0..(\$#INC-1)]", $lib, |
44bcdf29 | 24 | { switches => ['-IBla2'], nolib => 1 }, '-I'); |
143a3e5e | 25 | SKIP: { |
63c6dcc1 | 26 | skip 'Double colons not allowed in dir spec', 1 if $Is_VMS; |
7b903762 | 27 | $lib = 'Foo::Bar2'; |
63c6dcc1 | 28 | fresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib, |
44bcdf29 | 29 | { switches => ['-IFoo::Bar2'], nolib => 1 }, '-I with colons'); |
143a3e5e | 30 | } |