This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
72e8908b01b9fc3a60579d3bf045ac52ca484647
[perl5.git] / t / run / switchM.t
1 #!./perl
2
3 BEGIN {
4     chdir 't' if -d 't';
5     @INC = '../lib';
6 }
7 use strict;
8
9 require './test.pl';
10
11 plan(2);
12
13 like(runperl(switches => ['-Irun/flib', '-Mbroken'], stderr => 1),
14      qr/^Global symbol "\$x" requires explicit package name at run\/flib\/broken.pm line 6\./,
15      "Ensure -Irun/flib produces correct filename in warnings");
16
17 like(runperl(switches => ['-Irun/flib/', '-Mbroken'], stderr => 1),
18      qr/^Global symbol "\$x" requires explicit package name at run\/flib\/broken.pm line 6\./,
19      "Ensure -Irun/flib/ produces correct filename in warnings");