Commit | Line | Data |
---|---|---|
574c798a | 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 | |
7 | } | |
8 | ||
9 | BEGIN { | |
10 | plan(4); | |
11 | } | |
12 | ||
63c6dcc1 | 13 | my $Is_VMS = $^O eq 'VMS'; |
14 | my $lib; | |
15 | ||
7b903762 | 16 | $lib = 'Bla'; |
20189146 | 17 | ok(grep { $_ eq $lib } @INC[0..($#INC-1)]); |
143a3e5e | 18 | SKIP: { |
63c6dcc1 | 19 | skip 'Double colons not allowed in dir spec', 1 if $Is_VMS; |
7b903762 | 20 | $lib = 'Foo::Bar'; |
20189146 | 21 | ok(grep { $_ eq $lib } @INC[0..($#INC-1)]); |
143a3e5e | 22 | } |
574c798a | 23 | |
7b903762 | 24 | $lib = 'Bla2'; |
20189146 | 25 | fresh_perl_is("print grep { \$_ eq '$lib' } \@INC[0..(\$#INC-1)]", $lib, |
574c798a | 26 | { switches => ['-IBla2'] }, '-I'); |
143a3e5e | 27 | SKIP: { |
63c6dcc1 | 28 | skip 'Double colons not allowed in dir spec', 1 if $Is_VMS; |
7b903762 | 29 | $lib = 'Foo::Bar2'; |
63c6dcc1 | 30 | fresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib, |
143a3e5e | 31 | { switches => ['-IFoo::Bar2'] }, '-I with colons'); |
32 | } |