Skip to content

Commit

Permalink
Add test to make sure return -1 works
Browse files Browse the repository at this point in the history
Fix was commited here

049f5a6

This will close #463
  • Loading branch information
tisonkun committed Jun 9, 2018
1 parent 5f8cf42 commit c9f84d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion t/nqp/020-return.t
Expand Up @@ -25,8 +25,12 @@ sub nested() {
0;
}

sub blank() {
return 5;
}

ok( foo() == 1 , 'last value in block' );
ok( bar() == 2 , 'explicit return value in block');
ok( baz() == 3 , 'explicit return from nested block');
ok( nested() == 4 , 'explicit return from nested block with declared variables');

ok( blank() == 5 , 'more than one whitespace between return and expression');

0 comments on commit c9f84d3

Please sign in to comment.