]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/10-good.t
Fix a rare edge case for package whose names are prefix of 'main'
[perl/modules/indirect.git] / t / 10-good.t
index 388f8a049d5bc915a27a8bbd67fbf5e3f8abcdf5..708397f73a9cd44126c4532acfd8af1b1edd1147 100644 (file)
@@ -9,15 +9,17 @@ package main;
 use strict;
 use warnings;
 
-use Test::More tests => 41 * 4;
+use Test::More tests => 49 * 4;
 
 my ($obj, $pkg, $cb, $x, @a);
+our $y;
 sub meh;
 
 {
  local $/ = "####\n";
  while (<DATA>) {
   chomp;
+  s/\s*$//;
   local $SIG{__WARN__} = sub { die 'warn:' . join(' ', @_) };
   {
    use indirect;
@@ -129,16 +131,32 @@ $obj = new
       $x
     }(qw/bar baz/);
 ####
+meh;
+####
+meh $_;
+####
 meh $x;
 ####
-meh $x, 1 , 2;
+meh $x, 1, 2;
+####
+meh $y;
+####
+meh $y, 1, 2;
 ####
 print;
 ####
-print STDOUT "bananananananana\n";
+print $_;
+####
+print $x;
 ####
 print $x "oh hai\n";
 ####
+print $y;
+####
+print $y "dongs\n";
+####
+print STDOUT "bananananananana\n";
+####
 $x->foo($pkg->$cb)
 ####
 $obj = "apple ${\(new Hlagh)} pear"