Skip to content

Commit 18a47ab

Browse files
committed
Add test for RT #115724
1 parent eae2dc7 commit 18a47ab

File tree

1 file changed

+12
-7
lines changed
  • S06-operator-overloading

1 file changed

+12
-7
lines changed

S06-operator-overloading/sub.t

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 73;
5+
plan 74;
66

77
=begin pod
88
@@ -22,8 +22,6 @@ Testing operator overloading subroutines
2222
'prefix operator overloading for new operator');
2323
}
2424

25-
26-
2725
{
2826
sub prefix:<±> ($thing) { return "AROUND$thing"; };
2927
is ± "fish", "AROUNDfish", 'prefix operator overloading for new operator (unicode, latin-1 range)';
@@ -65,7 +63,7 @@ Testing operator overloading subroutines
6563
{
6664
my sub prefix:<->($thing) { return "CROSS$thing"; };
6765
is(-"fish", "CROSSfish",
68-
'prefix operator overloading for existing operator (but only lexically so we don\'t mess up runtime internals (needed at least for PIL2JS, probably for PIL-Run, too)');
66+
'prefix operator overloading for existing operator (but only lexically so we don\'t mess up runtime internals (needed at least for PIL2JS, probably for PIL-Run, too)');
6967
}
7068
7169
{
@@ -76,19 +74,19 @@ Testing operator overloading subroutines
7674
{
7775
sub infix:<C> ($text, $owner) { return "$text copyright $owner"; };
7876
is "romeo & juliet" C "Shakespeare", "romeo & juliet copyright Shakespeare",
79-
'infix operator overloading for new operator';
77+
'infix operator overloading for new operator';
8078
}
8179
8280
{
8381
sub infix:<©> ($text, $owner) { return "$text Copyright $owner"; };
8482
is "romeo & juliet" © "Shakespeare", "romeo & juliet Copyright Shakespeare",
85-
'infix operator overloading for new operator (unicode)';
83+
'infix operator overloading for new operator (unicode)';
8684
}
8785
8886
{
8987
sub infix:<(C)> ($text, $owner) { return "$text CopyRight $owner"; };
9088
is EVAL(q[ "romeo & juliet" (C) "Shakespeare" ]), "romeo & juliet CopyRight Shakespeare",
91-
'infix operator overloading for new operator (nasty)';
89+
'infix operator overloading for new operator (nasty)';
9290
}
9391
9492
{
@@ -439,6 +437,13 @@ Testing operator overloading subroutines
439437
lives_ok { sub postfix:<\\>($) {} }, 'can declare operator with a backslash (2)';
440438
}
441439
440+
# RT #115724
441+
#?rakudo.parrot skip 'RT #115724'
442+
{
443+
lives_ok { sub circumfix:<w "> ($a) { }; },
444+
'can define circumfix operator with a double quote (")';
445+
}
446+
442447
done;
443448
444449
# vim: ft=perl6

0 commit comments

Comments
 (0)