Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a test for defining a circumfix operator from a single constant.
  • Loading branch information
peschwa committed Oct 8, 2015
1 parent 7f75447 commit db4b845
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S06-operator-overloading/sub.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 84;
plan 86;

=begin pod
Expand Down Expand Up @@ -502,4 +502,11 @@ Testing operator overloading subroutines
is 5 ° 5, "55", 'can define and use operator with a sigiled constant as symbol';
}
{
lives-ok { constant $x = "µ, @"; sub circumfix:<<$x>>($) { 42 } },
'can define circumfix using << >> and both delimiters from the same constant';
my $test = EVAL 'constant $x = "µ, @"; sub circumfix:<<$x>>($) { 42 }; µ 5 @';
is $test, 42, 'can define and use circumfix using << >> and both delimiters from the same constant'
}
# vim: ft=perl6

0 comments on commit db4b845

Please sign in to comment.