Move script.t from t/comp to t/run, as it's a test for invoking perl.
[p5sagit/p5-mst-13.2.git] / t / run / switchI.t
index fa74b94..ffee2f9 100644 (file)
@@ -10,10 +10,23 @@ BEGIN {
     plan(4);
 }
 
-ok(grep { $_ eq 'Bla' } @INC);
-ok(grep { $_ eq 'Foo::Bar' } @INC);
+my $Is_VMS   = $^O eq 'VMS';
+my $lib;
 
-fresh_perl_is('print grep { $_ eq "Bla2" } @INC', 'Bla2',
+$lib = 'Bla';
+ok(grep { $_ eq $lib } @INC[0..($#INC-1)]);
+SKIP: {
+  skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
+  $lib = 'Foo::Bar';
+  ok(grep { $_ eq $lib } @INC[0..($#INC-1)]);
+}
+
+$lib = 'Bla2';
+fresh_perl_is("print grep { \$_ eq '$lib' } \@INC[0..(\$#INC-1)]", $lib,
              { switches => ['-IBla2'] }, '-I');
-fresh_perl_is('print grep { $_ eq "Foo::Bar2" } @INC', 'Foo::Bar2',
-             { switches => ['-IFoo::Bar2'] }, '-I with colons');
+SKIP: {
+  skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
+  $lib = 'Foo::Bar2';
+  fresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib,
+               { switches => ['-IFoo::Bar2'] }, '-I with colons');
+}