Author: fperrad
Date: Tue Aug 12 00:35:16 2008
New Revision: 30181

Modified:
   trunk/t/pmc/namespace.t

Log:
Iterate through the current namespace causes a segfault
applied patch from
http://rt.perl.org/rt3//Ticket/Display.html?id=57668

Modified: trunk/t/pmc/namespace.t
==============================================================================
--- trunk/t/pmc/namespace.t     (original)
+++ trunk/t/pmc/namespace.t     Tue Aug 12 00:35:16 2008
@@ -6,7 +6,7 @@
 use warnings;
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
-use Parrot::Test tests => 64;
+use Parrot::Test tests => 65;
 use Parrot::Config;
 
 =head1 NAME
@@ -1736,6 +1736,36 @@
 /Null PMC access in get_string()/
 OUT
 
+pir_output_is( <<'CODE', <<OUT, "RT #57668", todo => "iterate through a 
NameSpace PMC, RT #57668" );
+.namespace [ 'bar' ]
+
+.sub 'main' :main
+    $P0 = get_namespace
+    say $P0
+    $I0 = elements $P0
+    say $I0
+    new $P1 , 'Iterator', $P0
+  L1:
+    unless $P1 goto L2
+    $P2 = shift $P1
+    say $P2
+    goto L1
+  L2:
+    say 'OK'
+.end
+
+.sub 'foo'
+    say 'foo'
+.end
+CODE
+bar
+2
+main
+foo
+OK
+OUT
+
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Reply via email to