Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec] Tests for RT #65164

git-svn-id: http://svn.pugscode.org/pugs@28001 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit f80ef638f09d30e1c2530300cfe432cea552785f 1 parent ac168bf
kyle authored
Showing with 20 additions and 1 deletion.
  1. +20 −1 S03-operators/reduce-metaop.t
21 S03-operators/reduce-metaop.t
View
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 59;
+plan 71;
=begin pod
@@ -179,4 +179,23 @@ lives_ok({my @foo = [>>+<<] ([1..3],[1..3],[1..3])},'Parse [>>+<<]');
is( ([*]()), 1, "[*]() returns 1");
is( ([+]()), 0, "[+]() returns 0");
+# RT #65164 (TODO: implement [^^])
+#?rakudo skip 'implement [^^]'
+{
+ is [^^](0, 42), 42, '[^^] works (one of two true)';
+ is [^^](42, 0), 42, '[^^] works (one of two true)';
+ ok ! [^^](1, 42), '[^^] works (two true)';
+ ok ! [^^](0, 0), '[^^] works (two false)';
+
+ ok ! [^^](0, 0, 0), '[^^] works (three false)';
+ ok ! [^^](5, 9, 17), '[^^] works (three true)';
+
+ is [^^](5, 9, 0), (5 ^^ 9 ^^ 0), '[^^] mix 1';
+ is [^^](5, 0, 17), (5 ^^ 0 ^^ 17), '[^^] mix 2';
+ is [^^](0, 9, 17), (0 ^^ 9 ^^ 17), '[^^] mix 3';
+ is [^^](5, 0, 0), (5 ^^ 0 ^^ 0), '[^^] mix 4';
+ is [^^](0, 9, 0), (0 ^^ 9 ^^ 0), '[^^] mix 5';
+ is [^^](0, 0, 17), (0 ^^ 0 ^^ 17), '[^^] mix 6';
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.