Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mm] implement sub classes, start sorting tests
- Loading branch information
Showing
4 changed files
with
37 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
# vim: ft=perl6 | ||
use Test; | ||
|
||
{ | ||
my $x; | ||
INIT { | ||
$x = 1; | ||
} | ||
ok $x, "changes made in the protolexpad are visible at runtime"; | ||
} | ||
|
||
ok INIT { 1 }, "init blocks can return values"; | ||
|
||
{ | ||
my $x; | ||
my $unclonable-sub = INIT { sub () { $x } }; | ||
$x = 42; | ||
ok $unclonable-sub() == 42, "mainlines are not cloned"; | ||
} | ||
|
||
is $?FILE, 'test.pl', '$?FILE works'; | ||
is $?ORIG.substr(0,5), '# vim', '$?ORIG works'; | ||
|
||
|
||
done-testing; |