Skip to content

Commit c9f84d3

Browse files
authored
Add test to make sure return -1 works
Fix was commited here 049f5a6 This will close #463
1 parent 5f8cf42 commit c9f84d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

t/nqp/020-return.t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ sub nested() {
2525
0;
2626
}
2727

28+
sub blank() {
29+
return 5;
30+
}
31+
2832
ok( foo() == 1 , 'last value in block' );
2933
ok( bar() == 2 , 'explicit return value in block');
3034
ok( baz() == 3 , 'explicit return from nested block');
3135
ok( nested() == 4 , 'explicit return from nested block with declared variables');
32-
36+
ok( blank() == 5 , 'more than one whitespace between return and expression');

0 commit comments

Comments
 (0)