Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec] Tests for asymmetric variants of hypers on hashes.

git-svn-id: http://svn.pugscode.org/pugs@26748 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit b87c0d8db05c1f92aa6a737b0527beb22b2ec535 1 parent 8ba3aa4
jnthn authored
Showing with 23 additions and 1 deletion.
  1. +23 −1 S03-operators/hyper.t
View
24 S03-operators/hyper.t
@@ -8,7 +8,7 @@ use Test;
=end pod
-plan 76;
+plan 90;
# L<S03/Hyper operators>
# binary infix
@@ -350,4 +350,26 @@ my @e;
is +%r, 2, 'hash - <<+>> result has right number of keys (intersection test)';
is %r<a>, 6, 'hash - correct result form <<+>> (intersection test)';
is %r<b>, 8, 'hash - correct result form <<+>> (intersection test)';
+
+ %r = %a >>+>> %c;
+ is +%r, 3, 'hash - >>+>> result has right number of keys';
+ is %r<a>, 2, 'hash - correct result from >>+>>';
+ is %r<b>, 4, 'hash - correct result from >>+>>';
+ is %r<c>, 3, 'hash - correct result from >>+>>';
+
+ %r = %c >>+>> %b;
+ is +%r, 2, 'hash - >>+>> result has right number of keys';
+ is %r<a>, 6, 'hash - correct result from >>+>>';
+ is %r<b>, 8, 'hash - correct result from >>+>>';
+
+ %r = %c <<+<< %a;
+ is +%r, 3, 'hash - <<+<< result has right number of keys';
+ is %r<a>, 2, 'hash - correct result from <<+<<';
+ is %r<b>, 4, 'hash - correct result from <<+<<';
+ is %r<c>, 3, 'hash - correct result from <<+<<';
+
+ %r = %b <<+<< %c;
+ is +%r, 2, 'hash - <<+<< result has right number of keys';
+ is %r<a>, 6, 'hash - correct result from <<+<<';
+ is %r<b>, 8, 'hash - correct result from <<+<<';
}
Please sign in to comment.
Something went wrong with that request. Please try again.