summaryrefslogtreecommitdiff
path: root/t/run/switchI.t
blob: fcd2dc00f27828ccefe89deb805eaf1704f51b9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!./perl -IFoo::Bar -IBla

BEGIN {
    chdir 't' if -d 't';
    unshift @INC, '../lib';
    require './test.pl';	# for which_perl() etc
}

BEGIN {
    plan(4);
}

ok(grep { $_ eq 'Bla' } @INC);
SKIP: {
  skip 'Double colons not allowed in dir spec', 1 if $^O eq 'VMS';
  ok(grep { $_ eq 'Foo::Bar' } @INC);
}

fresh_perl_is('print grep { $_ eq "Bla2" } @INC', 'Bla2',
	      { switches => ['-IBla2'] }, '-I');
SKIP: {
  skip 'Double colons not allowed in dir spec', 1 if $^O eq 'VMS';
  fresh_perl_is('print grep { $_ eq "Foo::Bar2" } @INC', 'Foo::Bar2',
	        { switches => ['-IFoo::Bar2'] }, '-I with colons');
}