Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Correct circumfix:<< >> tests.
  • Loading branch information
peschwa committed Oct 8, 2015
1 parent 7ae2e35 commit d3b8702
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions S06-operator-overloading/sub.t
Expand Up @@ -503,19 +503,19 @@ Testing operator overloading subroutines
}
{
lives-ok { constant $x = "µ, @"; sub circumfix:<<$x>>($) { 42 } },
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 @';
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 (1)';
lives-ok { constant $x = "µµ, @@"; sub circumfix:<<$x>>($) { 42 } },
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 @@';
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 (2)';
lives-ok { constant sym = "µ, @"; sub circumfix:<< {sym} >>($) { 42 } },
lives-ok { constant sym = "µ @"; sub circumfix:<< {sym} >>($) { 42 } },
'can define circumfix using << {sym} >> and both delimiters from the same constant';
$test = EVAL 'constant sym = "µ, @"; sub circumfix:<< {sym} >>($) { 42 }; µ 5 @';
$test = EVAL 'constant sym = "µ @"; sub circumfix:<< {sym} >>($) { 42 }; µ 5 @';
is $test, 42, 'can define and use circumfix using << >> and both delimiters from the same constant'
}
Expand Down

0 comments on commit d3b8702

Please sign in to comment.