Add a test that "eval" does not create additional reference to ouside variables.
[p5sagit/p5-mst-13.2.git] / t / op / threads.t
index c8ed34a..7985688 100644 (file)
@@ -16,7 +16,7 @@ BEGIN {
        exit 0;
      }
 
-     plan(14);
+     plan(15);
 }
 
 use strict;
@@ -191,4 +191,21 @@ undef *a;
 threads->new(sub {})->join;
 pass("undefing a typeglob doesn't cause a crash during cloning");
 
+
+TODO: {
+    no strict 'vars';   # Accessing $TODO from test.pl
+    local $TODO = 'perl #70748';
+
+# Test we don't get:
+# panic: del_backref during global destruction.
+fresh_perl_is(<<'EOI', 'ok', { }, 'No del_backref panic');
+use threads;
+sub foo { return (sub { }); }
+my $bar = threads->create(\&foo)->join();
+threads->create(sub { })->join();
+print "ok";
+EOI
+
+} # TODO
+
 # EOF