Skip to content

Commit 04daf2d

Browse files
committed
eval => EVAL in S05, S06 and S09
1 parent bb5077a commit 04daf2d

40 files changed

+88
-88
lines changed

S05-capture/array-alias.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ok("abcd" ~~ m/a @<foo>=(<two>) d/, 'Compound hypothetical capture');
4949
lives_ok { $ret = $/[0]<two> }, 'Implicit hypothetical variable captured -- lives_ok';
5050
is $ret, "bc", 'Implicit hypothetical variable captured -- retval is correct';
5151
}
52-
ok(! eval('@<foo>'), 'Explicit hypothetical variable not captured');
52+
ok(! EVAL('@<foo>'), 'Explicit hypothetical variable not captured');
5353

5454
ok(" a b\tc" ~~ m/@<chars>=( @<spaces>=[\s+] (\S+))+/, 'Nested array capture');
5555
is("@<chars>", "a b c", 'Outer array capture');

S05-match/capturing-contexts.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ is_run( q{'aa' ~~ /(.)$1/},
149149
# RT 74180
150150
{
151151
my $s;
152-
try { $s = eval '"foo" ~~ /(foo)/; "$0a"' };
152+
try { $s = EVAL '"foo" ~~ /(foo)/; "$0a"' };
153153
ok not $!, 'alphabetic characters can follow digits in $0 variable in interpolation';
154154
is $s, 'fooa', 'alphabetic characters follows $0 interpolated value';
155155
}

S05-match/perl.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ my $m = ExprT1.parse('2 + 4');
1717
ok $m, 'Regex matches (1)';
1818
lives_ok { $m.perl }, '$/.perl lives (with named captures';
1919
#?niecza skip 'No value for parameter $a in is_deeply'
20-
is_deeply eval($m.perl), $m, '... and it reproduces the right thing (1)';
20+
is_deeply EVAL($m.perl), $m, '... and it reproduces the right thing (1)';
2121
#?niecza todo 'empty result'
22-
is ~eval($m.perl).<operator>, '+', ' right result (2)';
22+
is ~EVAL($m.perl).<operator>, '+', ' right result (2)';
2323

2424
my regex f { f };
2525
my regex o { o };
@@ -36,7 +36,7 @@ lives_ok { $/.perl }, 'lives on quantified named captures';
3636
isa_ok $/, Match;
3737
is $/.ast, $code_str, 'Match.ast is the code matched';
3838
is $/.Str, $code_str, 'Match.Str is the code matched';
39-
is_deeply eval($/.perl), $/, 'eval of Match.perl recreates Match';
39+
is_deeply EVAL($/.perl), $/, 'EVAL of Match.perl recreates Match';
4040
}
4141

4242
# vim: ft=perl6

S05-metasyntax/charset.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ ok 'b' ~~ /<[. .. b]>/, 'weird char class matches at least its end point';
103103
# RT #69682
104104
#?pugs todo
105105
{
106-
try { eval "/<[a-z]>/"; }
106+
try { EVAL "/<[a-z]>/"; }
107107
ok ~$! ~~ / 'Unsupported use of - as character range; in Perl 6 please use ..'/,
108108
"STD error message for - as character range";
109109
}

S05-metasyntax/delimiters.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ my %todo;
1111
#?niecza emit %todo = < ? 1 * 1 + 1 ~ 1 >;
1212

1313
for @delims -> $d {
14-
my $ok = try { eval("my \$x = 'abc'; \$x ~~ m{$d}b{$d}") };
15-
my $nok = try { eval("my \$x = 'abc'; \$x ~~ m{$d}d{$d}") };
16-
my $is = try { eval("my \$x = 'abc'; \$x ~~ s{$d}a{$d}b{$d}; \$x") } eq 'bbc';
14+
my $ok = try { EVAL("my \$x = 'abc'; \$x ~~ m{$d}b{$d}") };
15+
my $nok = try { EVAL("my \$x = 'abc'; \$x ~~ m{$d}d{$d}") };
16+
my $is = try { EVAL("my \$x = 'abc'; \$x ~~ s{$d}a{$d}b{$d}; \$x") } eq 'bbc';
1717

1818
todo "$d not yet supported" if %todo{$d};
1919
ok $ok && !$nok && $is, "$d as delimiter in match and substitution";

S05-metasyntax/regex.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ ok ';' ~~ /\;/, 'escaped ";" in m// works';
8080
# RT #64668
8181
#?niecza skip 'Exception NYI'
8282
{
83-
try { eval '"RT #64668" ~~ /<nosuchrule>/' };
83+
try { EVAL '"RT #64668" ~~ /<nosuchrule>/' };
8484
ok $! ~~ Exception, 'use of missing named rule dies';
8585
ok "$!" ~~ /nosuchrule/, 'error message mentions the missing rule';
8686
}

S05-metasyntax/unknown.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ lives_ok({"aa!" ~~ /'a'/}, 'quoted "a" is valid');
2525

2626
# RT #74832
2727
{
28-
dies_ok {eval('/ a+ + /')}, 'Cannot parse regex a+ +';
28+
dies_ok {EVAL('/ a+ + /')}, 'Cannot parse regex a+ +';
2929
#?rakudo todo 'RT 74832'
3030
#?niecza todo
3131
ok "$!" ~~ /:i quantif/, 'error message mentions quantif{y,ier}';

S05-modifier/ignorecase.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ok 'a' ~~ /:i < A B > /, ':i and quote words';
7070

7171
# RT #114692
7272
{
73-
try eval '"ABC" ~~ /:iabc/';
73+
try EVAL '"ABC" ~~ /:iabc/';
7474
ok $!, "need whitespace after modifier";
7575
}
7676

S05-substitution/match.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ok $str.match(/h/)~~Match, '.. it returns a Match object';
1616
#?DOES 6
1717
{
1818
for ('a'..'f') {
19-
my $r = eval("rx/$_/");
19+
my $r = EVAL("rx/$_/");
2020
is $str.match($r), $str~~$r, ".. works as ~~ matching '$str' with /$_/";
2121
}
2222
}

S05-transliteration/trans.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ is("&nbsp;&lt;&gt;&amp;".trans(:c, :s, (['&nbsp;', '&gt;', '&amp;'] =>
237237
#?niecza skip 'Action method quote:tr not yet implemented'
238238
{
239239
#?pugs todo
240-
is(eval('"abc".trans(<== "a" => "A")'), "Abc",
240+
is(EVAL('"abc".trans(<== "a" => "A")'), "Abc",
241241
"you're allowed to leave off the (...) named arg parens when you use <==");
242242

243243
# Make sure the tr/// version works, too.

0 commit comments

Comments
 (0)