]> 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 e503cecde5ae03fd7bcefd8c186a3fd0ddc44585..708397f73a9cd44126c4532acfd8af1b1edd1147 100644 (file)
@@ -9,15 +9,17 @@ package main;
 use strict;
 use warnings;
 
-use Test::More tests => 45 * 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;
@@ -137,16 +139,24 @@ meh $x;
 ####
 meh $x, 1, 2;
 ####
+meh $y;
+####
+meh $y, 1, 2;
+####
 print;
 ####
 print $_;
 ####
 print $x;
 ####
-print STDOUT "bananananananana\n";
-####
 print $x "oh hai\n";
 ####
+print $y;
+####
+print $y "dongs\n";
+####
+print STDOUT "bananananananana\n";
+####
 $x->foo($pkg->$cb)
 ####
 $obj = "apple ${\(new Hlagh)} pear"