3 # Copyright (C) 2007, The Perl Foundation.
8 use lib qw(t . lib ../lib ../../lib ../../../lib);
9 use Parrot::Test tests => 10;
12 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'long sub invocation' );
38 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'long sub invocation 2' );
54 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'short sub invocation' );
58 (x, y, z) = foo(1, 2, 3)
69 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'short yield' );
79 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'long yield' );
92 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'tail call' );
108 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'tail method call' );
124 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'nci call' );
135 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'long method call' );
157 language_output_like( 'PIR_PGE', <<'CODE', qr/Parse successful!/, 'short sub call with flags' );
159 # the sub body is taken from PDD03
164 foo(x, y :named('y'))
166 foo(a, b, c :flat, 'x' => 3, 'y' => 4, z :flat :named('z'))
168 x = foo() # single result
169 (i, j :optional, ar :slurpy, value :named('key') ) = foo()
173 .return (i, ar :flat, value :named('key') )