Fix and test for [perl #15549 Empty \Q\E not permitted]
[p5sagit/p5-mst-13.2.git] / t / run / switchI.t
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
13 ok(grep { $_ eq 'Bla' } @INC);
14 SKIP: {
15   skip 'Double colons not allowed in dir spec', 1 if $^O eq 'VMS';
16   ok(grep { $_ eq 'Foo::Bar' } @INC);
17 }
18
19 fresh_perl_is('print grep { $_ eq "Bla2" } @INC', 'Bla2',
20               { switches => ['-IBla2'] }, '-I');
21 SKIP: {
22   skip 'Double colons not allowed in dir spec', 1 if $^O eq 'VMS';
23   fresh_perl_is('print grep { $_ eq "Foo::Bar2" } @INC', 'Foo::Bar2',
24                 { switches => ['-IFoo::Bar2'] }, '-I with colons');
25 }