This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Delete useless references to DG/UX
[perl5.git] / t / run / switchM.t
CommitLineData
6b0bdd7f
MH
1#!./perl
2
3BEGIN {
4 chdir 't' if -d 't';
5 @INC = '../lib';
d9c544bf
TH
6 require Config;
7 import Config;
8
6b0bdd7f
MH
9}
10use strict;
11
12require './test.pl';
13
9fdd5a7a 14plan(4);
6b0bdd7f
MH
15
16like(runperl(switches => ['-Irun/flib', '-Mbroken'], stderr => 1),
d8c6310a
FC
17 qr/^Global symbol "\$x" requires explicit package name \(did you (?x:
18 )forget to declare "my \$x"\?\) at run\/flib\/broken.pm line 6\./,
6b0bdd7f
MH
19 "Ensure -Irun/flib produces correct filename in warnings");
20
21like(runperl(switches => ['-Irun/flib/', '-Mbroken'], stderr => 1),
d8c6310a
FC
22 qr/^Global symbol "\$x" requires explicit package name \(did you (?x:
23 )forget to declare "my \$x"\?\) at run\/flib\/broken.pm line 6\./,
6b0bdd7f 24 "Ensure -Irun/flib/ produces correct filename in warnings");
9fdd5a7a 25
d9c544bf 26SKIP: {
ebfad2b9
DD
27 my $no_pmc;
28 foreach(Config::non_bincompat_options()) {
29 if($_ eq "PERL_DISABLE_PMC"){
30 $no_pmc = 1;
31 last;
32 }
33 }
34
35 if ( $no_pmc ) {
d9c544bf
TH
36 skip('Tests fail without PMC support', 2);
37 }
38
39 like(runperl(switches => ['-Irun/flib', '-Mt2'], prog => 'print t2::id()', stderr => 1),
40 qr/^t2pmc$/,
41 "Ensure -Irun/flib loads pmc");
9fdd5a7a 42
d9c544bf
TH
43 like(runperl(switches => ['-Irun/flib/', '-Mt2'], prog => 'print t2::id()', stderr => 1),
44 qr/^t2pmc$/,
45 "Ensure -Irun/flib/ loads pmc");
46}