- Timestamp:
- 10/16/08 18:51:42 (3 months ago)
- Files:
-
- 1 modified
-
t/spec/S03-operators/where.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
t/spec/S03-operators/where.t
r22611 r22631 2 2 plan 8; 3 3 4 # L<S03/"Junctive and (all) precedence"/"infix:< where>">4 # L<S03/"Junctive and (all) precedence"/"infix:<also>"> 5 5 6 ok ?(1 where 2), "basic infix:<where>";7 ok ?(1 where 2 where 3), "basic infix:<where> (multiple where's)";8 ok !(0 where 1), "wherehas and-semantics (first term 0)";9 ok !(1 where 0), "wherehas and-semantics (second term 0)";6 ok ?(1 also 2), "basic infix:<also>"; 7 ok ?(1 also 2 also 3), "basic infix:<also> (multiple also's)"; 8 ok !(0 also 1), "also has and-semantics (first term 0)"; 9 ok !(1 also 0), "also has and-semantics (second term 0)"; 10 10 11 11 my $x = ''; 12 12 13 ok ?('a' ~~ { $x ~= "b"; True } where { $x ~= "c"; True }), 'wherewith two blocks';13 ok ?('a' ~~ { $x ~= "b"; True } also { $x ~= "c"; True }), 'also with two blocks'; 14 14 is $x, 'bc', 'blocks called in the right order'; 15 15 16 16 my $executed = 0; 17 17 18 ok !('a' ~~ 'b' where{ $executed = 1; True }), 'and semantics';18 ok !('a' ~~ 'b' also { $executed = 1; True }), 'and semantics'; 19 19 ok !$executed, 'short-circuit'; 20 20
