root/t/syntax/stmt_or_expr.t

Revision 20490, 432 bytes (checked in by Auzon, 8 months ago)

s/use v6-alpha;$/use v6;/;
Also catching a few other mentions of v6-alpha.

  • Property svn:mime-type set to text/plain; charset=UTF-8
  • Property svn:eol-style set to native
Line 
1use v6;
2
3use Test;
4
5plan 3;
6
7my $x = do {
8        10
9} + 1;
10
11is($x, 11, "'} + 1' is in a single statement");
12
13my $y = do {
14        10
15}
16+ 1;
17
18# L<A04/"RFC 022: Control flow: Builtin switch statement" /the final curly is on a line by itself/>
19
20is($y, 10, "}\\n + 1 are two statements");
21
22my $z = [];
23eval q:to/EOC/
24    $x = [ do { 1 }
25            + 2 ];
26    EOC
27;
28
29is($z[0], 3, 'auto-curly doesn\'t apply unless we\'re at top level', :todo<bug>);
Note: See TracBrowser for help on using the browser.