[svn:parrot] r48477 - branches/gc_threshold_tuning/t/op

chromatic at svn.parrot.org chromatic at svn.parrot.org
Sat Aug 14 00:32:46 UTC 2010


Author: chromatic
Date: Sat Aug 14 00:32:46 2010
New Revision: 48477
URL: https://trac.parrot.org/parrot/changeset/48477

Log:
add test for TT#1733

Modified:
   branches/gc_threshold_tuning/t/op/calling.t

Modified: branches/gc_threshold_tuning/t/op/calling.t
==============================================================================
--- branches/gc_threshold_tuning/t/op/calling.t	Sat Aug 14 00:32:43 2010	(r48476)
+++ branches/gc_threshold_tuning/t/op/calling.t	Sat Aug 14 00:32:46 2010	(r48477)
@@ -7,7 +7,7 @@
 use lib qw( . lib ../lib ../../lib );
 
 use Test::More;
-use Parrot::Test tests => 98;
+use Parrot::Test tests => 99;
 
 =head1 NAME
 
@@ -2554,6 +2554,48 @@
 done
 OUTPUT
 
+pir_output_is( <<'CODE', <<'OUTPUT', "handling of slurpy after optional, TT #1733" );
+
+# Lua calling convention scheme
+
+# f() has 2 known parameters
+.sub 'f'
+    .param pmc p1 :optional
+    .param int has_p1 :opt_flag
+    .param pmc p2 :optional
+    .param int has_p2 :opt_flag
+    .param pmc extra :slurpy
+    unless has_p1 goto L1
+    say p1
+    unless has_p2 goto L1
+    say p2
+    $P0 = iter extra
+  L2:
+    unless $P0 goto L1
+    $P1 = shift $P0
+    say $P1
+    goto L2
+  L1:
+.end
+
+.sub 'main' :main
+    $P1 = box "p1"
+    $P2 = box "p2"
+    $P3 = box "p3"
+    f($P1, $P2, $P3)
+    f($P1, $P2)
+    f($P1)
+.end
+
+CODE
+p1
+p2
+p3
+p1
+p2
+p1
+OUTPUT
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4


More information about the parrot-commits mailing list