Permalink
Browse files

[t/spec] Tests for [&&] and [and]. Patch courtesy of (Alex Kapranoff)++.

git-svn-id: http://svn.pugscode.org/pugs@31507 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 85f8dc3 commit fc7413f7ebec9e076e9509a657ff348bd7f074a6 jnthn committed Jun 29, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 S03-metaops/reduce.t
View
@@ -111,6 +111,15 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
is (~ [\||] 0, 0, 3, 4, 5), "0 0 3 3 3", "[\\||] works";
}
+{
+ my @array = (Mu, Mu, 0, 3, Mu, 5);
+ my @array1 = (2, 3, 4);
+ nok ([&&] @array), "[&&] works with 1 false";
+ is ([&&] @array1), 4, "[&&] works";
+ nok ([and] @array), "[and] works with 1 false";
+ is ([and] @array1), 4, "[and] works";
+}
+
# not currently legal without an infix subscript operator
# {
# my $hash = {a => {b => {c => {d => 42, e => 23}}}};

0 comments on commit fc7413f

Please sign in to comment.