[svn:parrot] r36536 - trunk/t/compilers/imcc/syn
cotto at svn.parrot.org
cotto at svn.parrot.org
Tue Feb 10 15:21:35 UTC 2009
Author: cotto
Date: Tue Feb 10 15:21:34 2009
New Revision: 36536
URL: https://trac.parrot.org/parrot/changeset/36536
Log:
[imcc] add test for ridiculous number of params
Modified:
trunk/t/compilers/imcc/syn/pcc.t
Modified: trunk/t/compilers/imcc/syn/pcc.t
==============================================================================
--- trunk/t/compilers/imcc/syn/pcc.t Tue Feb 10 13:32:51 2009 (r36535)
+++ trunk/t/compilers/imcc/syn/pcc.t Tue Feb 10 15:21:34 2009 (r36536)
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Config;
-use Parrot::Test tests => 21;
+use Parrot::Test tests => 22;
##############################
# Parrot Calling Conventions
@@ -524,7 +524,23 @@
my $too_many_args_args = join ',', 1 .. 20_000;
$too_many_args =~ s/_ARGS_/$too_many_args_args/;
-pir_output_is( $too_many_args, "didn't segfault\n", "calling a sub with way too many params" );
+pir_output_is( $too_many_args, "didn't segfault\n", "calling a sub with way too many args" );
+
+my $too_many_params = <<'CODE';
+.sub main :main
+ 'foo'()
+ say "didn't segfault"
+.end
+
+.sub foo
+ _PARAMS_
+.end
+CODE
+
+my $too_many_params_params = join map { " .param pmc xx$_\n" } 1 .. 20_000;
+$too_many_params =~ s/_PARAMS_/$too_many_params_params/;
+
+pir_output_is( $too_many_params, "didn't segfault\n", "calling a sub with way too many params" );
# Local Variables:
# mode: cperl
More information about the parrot-commits
mailing list