]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/10-good.t
Really test that no indirect 'hlagh' does not croak
[perl/modules/indirect.git] / t / 10-good.t
index d6b4a6aea32dcbfed5804272d67d3edc11429cbe..6559b5410a41f3ffa53fce7d106b5e78157c24e3 100644 (file)
@@ -9,16 +9,20 @@ package main;
 use strict;
 use warnings;
 
-use Test::More tests => 49 * 4;
+use Test::More tests => 53 * 4;
+
+use feature 'state';
 
 my ($obj, $pkg, $cb, $x, @a);
 our $y;
+state $z;
 sub meh;
 
 {
  local $/ = "####\n";
  while (<DATA>) {
   chomp;
+  s/\s*$//;
   local $SIG{__WARN__} = sub { die 'warn:' . join(' ', @_) };
   {
    use indirect;
@@ -142,6 +146,10 @@ meh $y;
 ####
 meh $y, 1, 2;
 ####
+meh $z;
+####
+meh $z, 1, 2;
+####
 print;
 ####
 print $_;
@@ -154,6 +162,10 @@ print $y;
 ####
 print $y "dongs\n";
 ####
+print $z;
+####
+print $z "hlagh\n";
+####
 print STDOUT "bananananananana\n";
 ####
 $x->foo($pkg->$cb)