Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

simplify subrule.t a bit

  • Loading branch information...
commit 8fb35f59c8da14545a7bb60c1a61ccc6ef9dee70 1 parent 149135c
@moritz moritz authored
Showing with 6 additions and 6 deletions.
  1. +4 −4 S04-statements/lazy.t
  2. +2 −2 S05-capture/subrule.t
View
8 S04-statements/lazy.t
@@ -9,7 +9,7 @@ plan 12;
{
my $was_in_lazy;
- my $var := lazy { $was_in_lazy++; 42 };
+ my $var := LAZY { $was_in_lazy++; 42 };
ok !$was_in_lazy, 'our lazy block wasn\'t yet executed (1)';
@@ -23,7 +23,7 @@ plan 12;
# dies_ok/lives_ok tests:
{
my $was_in_lazy;
- my $lazy := lazy { $was_in_lazy++; 42 };
+ my $lazy := LAZY { $was_in_lazy++; 42 };
lives_ok { $lazy = 23 }, "reassigning our var containing a lazy worked (1)";
is $lazy, 23, "reassigning our var containing a lazy worked (2)";
ok !$was_in_lazy, "reassigning our var containing a lazy worked (3)";
@@ -31,7 +31,7 @@ plan 12;
{
my $was_in_lazy;
- my $lazy := lazy { $was_in_lazy++; 42 };
+ my $lazy := LAZY { $was_in_lazy++; 42 };
lives_ok { $lazy := 23 }, "rebinding our var containing a lazy worked (1)";
is $lazy, 23, "rebinding our var containing a lazy worked (2)";
ok !$was_in_lazy, "rebinding our var containing a lazy worked (3)";
@@ -39,7 +39,7 @@ plan 12;
#?rakudo todo 'why ever not?'
{
- dies_ok { (lazy { 42 }) = 23 },
+ dies_ok { (LAZY { 42 }) = 23 },
"directly assigning to a lazy var does not work";
}
View
4 S05-capture/subrule.t
@@ -47,7 +47,7 @@ is(~$/<cap><abc>, "abc", 'Cap abc captured');
ok(@($/) == 0, 'Cap no array capture');
ok(%($/).keys == 1, 'Cap hash capture');
-my regex repcap {<abc=&abc>**{4}}
+my regex repcap {<abc=&abc>**4}
ok("abcabcabcabcd" ~~ m/<repcap=&repcap>/, 'Repcap match');
ok($/, 'Repcap matched');
@@ -60,7 +60,7 @@ is(~$/<repcap><abc>[3], "abc", 'Repcap abc three captured');
ok(@($/) == 0, 'Repcap no array capture');
-my regex caprep {(<&abc>**{4})}
+my regex caprep {(<&abc>**4)}
ok("abcabcabcabcd" ~~ m/<caprep=&caprep>/, 'Caprep match');
ok($/, 'Caprep matched');
Please sign in to comment.
Something went wrong with that request. Please try again.