Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (20 sloc) 0.805 kb
use Test;
plan 8;
# L<S03/"Junctive and (all) precedence"/"infix:<&>">
ok ?(1 S& 2), "basic infix:<S&>";
#?niecza skip 'Excess arguments to CORE seqop, used 3 of 4 positionals'
ok ?(1 S& 2 S& 3), "basic infix:<S&> (multiple S&'s)";
#?rakudo todo 'nom regression'
ok !(0 S& 1), "S& has and-semantics (first term 0)";
#?rakudo todo 'nom regression'
ok !(1 S& 0), "also has and-semantics (second term 0)";
my $x = '';
ok ?('a' ~~ { $x ~= "b"; True } S& { $x ~= "c"; True }), 'S& with two blocks';
#?rakudo todo 'nom regression'
is $x, 'bc', 'blocks called in the right order';
my $executed = 0;
#?rakudo todo 'nom regression'
ok !('a' ~~ 'b' S& { $executed = 1; True }), 'and semantics';
#?niecza todo
ok !$executed, 'short-circuit';
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.