Skip to content

Commit

Permalink
tests for RT #117579.
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Apr 14, 2013
1 parent 2b710bd commit 81449cb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S03-junctions/boolean-context.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 73;
plan 77;

# L<S03/Junctive operators/>

Expand Down Expand Up @@ -143,4 +143,15 @@ ok do if 1 <= 1 & 2 & 3 & 4 <= 3 { 0 } else { 1 };
ok do if none(1, @a, 4) > 4 { 1 } else { 0 }, "flattening in none works";
}

# RT 117579
{
ok do if 1 ne 2|3|4 { 1 } else { 0 }, "ne in if context";
ok do if 1 ne 1|3|4 { 0 } else { 1 }, "ne in if context";

my $invoc = 0;
sub infix:<test>(Mu $a, Mu $b) { $invoc++; True };
ok do if 1 test 2 | 3 | 4 | 5 { 1 } else { 0 }, "custom operator";
is $invoc, 1, "operator with Mu argument doesn't get autothreaded.";
}

# vim: ft=perl6

0 comments on commit 81449cb

Please sign in to comment.