Skip to content

Commit bb5077a

Browse files
committed
eval => EVAL in S03 and S04
1 parent 7cac63f commit bb5077a

File tree

31 files changed

+112
-112
lines changed

31 files changed

+112
-112
lines changed

S03-binding/closure.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@ use Test;
44
plan 8;
55

66
diag "Testing for calling block bindings...";
7-
is eval(q[
7+
is EVAL(q[
88
my &foo := { "foo" };
99
foo;
1010
]), 'foo', "Calling block binding without argument. (Runtime)";
1111

1212
{
13-
is eval(q[
13+
is EVAL(q[
1414
my &foo ::= { "foo" };
1515
foo;
1616
]), 'foo', "Calling block binding without argument. (read-only bind)";
1717
}
1818

19-
is eval(q[
19+
is EVAL(q[
2020
my &foo := { $^a };
2121
foo(1);
2222
]), 1, "Calling block binding with argument. (Runtime, with parens)";
2323

24-
is eval(q[
24+
is EVAL(q[
2525
my &foo := { $^a };
2626
foo 1;
2727
]), 1, "Calling block binding with argument. (Runtime, no parens)";
2828

2929
{
30-
is eval(q[
30+
is EVAL(q[
3131
my &foo ::= { $^a };
3232
foo(1);
3333
]), 1, "Calling block binding with argument. (read-only bind, with parens)";
3434

35-
is eval(q[
35+
is EVAL(q[
3636
my &foo ::= { $^a };
3737
foo 1;
3838
]), 1, "Calling block binding with argument. (read-only bind, no parens)";

S03-metaops/cross.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test;
44
plan 28;
55

66
# L<S03/List infix precedence/the cross operator>
7-
ok eval('<a b> X <c d>'), 'cross non-meta operator parses';
7+
ok EVAL('<a b> X <c d>'), 'cross non-meta operator parses';
88

99
{
1010
my @result = <a b> X <1 2>;
@@ -38,7 +38,7 @@ is ([+] 1, 2, 3 X** 2, 4), (1+1 + 4+16 + 9+81), '[+] and X** work';
3838
}
3939

4040
# L<S03/Cross operators>
41-
ok eval('<a b> X, <c d>'), 'cross metaoperator parses';
41+
ok EVAL('<a b> X, <c d>'), 'cross metaoperator parses';
4242

4343
# L<S03/Cross operators/"string concatenating form is">
4444
#?pugs todo 'feature'

S03-metaops/hyper.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,10 @@ my @e;
381381
{ key => 'val' }
382382
);
383383

384-
my $full = join '', eval '@array>>.<key>';
384+
my $full = join '', EVAL '@array>>.<key>';
385385
is($full, 'valvalval', 'hyper-dereference an array');
386386

387-
my $part = join '', eval '@array[0,1]>>.<key>';
387+
my $part = join '', EVAL '@array[0,1]>>.<key>';
388388
is($part, 'valval', 'hyper-dereference an array slice');
389389
}
390390

@@ -696,12 +696,12 @@ my @e;
696696

697697
# test non-UTF-8 input
698698
#?niecza skip 'nonsensical test'
699-
#?pugs skip 'eval(Buf)'
700-
#?rakudo skip 'eval(Buf)'
699+
#?pugs skip 'EVAL(Buf)'
700+
#?rakudo skip 'EVAL(Buf)'
701701
#?DOES 1
702702
{
703703
my $t = '(1, 2, 3) »+« (4, 3, 2)';
704-
ok !eval($t.encode('ISO-8859-1')),
704+
ok !EVAL($t.encode('ISO-8859-1')),
705705
'Latin-1 »+« without pre-declaration is an error';
706706
}
707707

@@ -743,7 +743,7 @@ my @e;
743743
# RT #77010
744744

745745
{
746-
# niecza doesn't propagate slangs into &eval yet
746+
# niecza doesn't propagate slangs into &EVAL yet
747747
eval_lives_ok 'sub infix:<+++>($a, $b) { ($a + $b) div 2 }; 10 >>+++<< 14', 'can use hypers with local scoped user-defined operators';
748748
}
749749

S03-metaops/zip.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ use v6;
33
use Test;
44
plan 24;
55

6-
ok eval('<a b> Z <c d>'), 'zip non-meta operator parses';
6+
ok EVAL('<a b> Z <c d>'), 'zip non-meta operator parses';
77

88
is (<a b> Z <1 2>), <a 1 b 2>, 'non-meta zip produces expected result';
99

1010
is (1, 2, 3 Z** 2, 4), (1, 16), 'zip-power works';
1111

12-
ok eval('<a b> Z, <c d>'), 'zip metaoperator parses';
12+
ok EVAL('<a b> Z, <c d>'), 'zip metaoperator parses';
1313

1414
is (<a b> Z~ <1 2>), <a1 b2>, 'zip-concat produces expected result';
1515

S03-operators/adverbial-modifiers.t

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ is blub "bar":times(2), 'BLUBBLUBbar', 'user-defined prefix operator, :times adv
4040
is ~$v, ~$e, ':foo«alice»';
4141

4242
$e = (foo => { a => 1, b => 2 });
43-
$v = eval ':foo{ a => 1, b => 2 }';
43+
$v = EVAL ':foo{ a => 1, b => 2 }';
4444
is ~$v, ~$e, ':foo{ a => 1, b => 2 }';
4545

4646
$e = (foo => { dostuff() });
@@ -106,23 +106,23 @@ sub fiddle(:$x,:$y){ violin($x) ~ violin($y) }
106106
# Since the demagicalizing of pairs, this test shouldn't and doesn't work any
107107
# longer.
108108

109-
# $v = 'eval failed';
110-
# eval '$v = fiddle :x("a") :y("b")()';
109+
# $v = 'EVAL failed';
110+
# EVAL '$v = fiddle :x("a") :y("b")()';
111111
# #?pugs todo 'bug'
112112
# is $v, "ab", 'fiddle :x("a") :y("b")()';
113113

114-
# $v = 'eval failed';
115-
# eval '$v = fiddle :x("a") :y("b") ()';
114+
# $v = 'EVAL failed';
115+
# EVAL '$v = fiddle :x("a") :y("b") ()';
116116
# #?pugs todo 'bug'
117117
# is $v, "ab", 'fiddle :x("a") :y("b") ()';
118118

119-
# $v = 'eval failed';
120-
# eval '$v = fiddle :x("a"):y("b") ()';
119+
# $v = 'EVAL failed';
120+
# EVAL '$v = fiddle :x("a"):y("b") ()';
121121
# #?pugs todo 'bug'
122122
# is $v, "ab", 'fiddle :x("a"):y("b") ()';
123123

124-
# $v = 'eval failed';
125-
# eval '$v = fiddle :x("a"):y("b")()';
124+
# $v = 'EVAL failed';
125+
# EVAL '$v = fiddle :x("a"):y("b")()';
126126
# #?pugs todo 'bug'
127127
# is $v, "ab", 'fiddle :x("a"):y("b")()';
128128

S03-operators/brainos.t

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ instead. Similar for C<!~>.
1515
#L<S03/Chaining binary precedence/"To catch">
1616

1717
my $str = 'foo';
18-
try { eval '$str =~ m/bar/;' };
18+
try { EVAL '$str =~ m/bar/;' };
1919
ok $! ~~ Exception, 'caught "=~" braino';
2020
ok "$!" ~~ /'~~'/, 'error for "=~" usage mentions "~~"';
2121

22-
try { eval '$str !~ m/bar/;' };
22+
try { EVAL '$str !~ m/bar/;' };
2323
ok $! ~~ Exception, 'caught "!~" braino';
2424
ok "$!" ~~ /'!~~'/, 'error for "!~" usage mentions "!~~"';
2525

2626
# RT #76878
2727
{
2828
my $x = 2;
29-
is eval('"$x =~ b"'), '2 =~ b', '=~ allowed in double quotes';
30-
is eval('"$x !~ b"'), '2 !~ b', '!~ allowed in double quotes';
31-
is eval('"$x << b"'), '2 << b', '<< allowed in double quotes';
32-
is eval('"$x >> b"'), '2 >> b', '>> allowed in double quotes';
33-
is eval('"$x . b"'), '2 . b', '. allowed in double quotes';
29+
is EVAL('"$x =~ b"'), '2 =~ b', '=~ allowed in double quotes';
30+
is EVAL('"$x !~ b"'), '2 !~ b', '!~ allowed in double quotes';
31+
is EVAL('"$x << b"'), '2 << b', '<< allowed in double quotes';
32+
is EVAL('"$x >> b"'), '2 >> b', '>> allowed in double quotes';
33+
is EVAL('"$x . b"'), '2 . b', '. allowed in double quotes';
3434
}
3535

3636
# vim: ft=perl6

S03-operators/context-forcers.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ sub iis(Mu $a, Mu $b, $descr) {
8383

8484
ok 4.Str ~~ Str, 'Int.Str returns a Str';
8585

86-
sub eval_elsewhere($code){ eval($code) }
86+
sub eval_elsewhere($code){ EVAL($code) }
8787

8888
# L<S02/Context/numeric "+">
8989
# numeric (+) context

S03-operators/flip-flop.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ plan 39;
119119
#?rakudo skip 'dubious scoping?'
120120
{
121121

122-
# keep track of # of times lhs and rhs are eval'd by adding
122+
# keep track of # of times lhs and rhs are EVAL'd by adding
123123
# a state var to both sides.
124124
sub ff_eval($code, $lhs, $rhs, @a) {
125125
my $lhs_run = 0;

S03-operators/is-divisible-by.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ plan 15;
3131
} #1
3232

3333
{
34-
dies_ok {eval "9 %% 0"}, 'cannot divide by zero using infix:<%%>';
34+
dies_ok {EVAL "9 %% 0"}, 'cannot divide by zero using infix:<%%>';
3535
#?rakudo todo "not sure why this doesn't fire"
36-
dies_ok {eval "9 !%% 0"}, 'cannot divide by zero using infix:<%%>';
36+
dies_ok {EVAL "9 !%% 0"}, 'cannot divide by zero using infix:<%%>';
3737
} #2

S03-operators/precedence.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ eval_dies_ok '1, 2 Z 3, 4 X 5, 6',
231231

232232
# RT 73266
233233
{
234-
try { eval 'say and die 73266' };
234+
try { EVAL 'say and die 73266' };
235235
ok ~$! !~~ '73266', 'and after say is not interpreted as infix:<and>';
236236
}
237237

0 commit comments

Comments
 (0)