Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure bag() can take a large Array as argument.
  • Loading branch information
Graham Todd committed Sep 26, 2014
1 parent 6cb7067 commit d720ab5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion S03-operators/bag.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 100;
plan 101;

sub showkv($x) {
$x.keys.sort.map({ $^k ~ ':' ~ $x{$k} }).join(' ')
Expand Down Expand Up @@ -116,6 +116,9 @@ isa_ok ($ks (+) $b), Bag, "... and it's actually a Bag (texas)";
is showkv($kb (+) $b), "blood:3 love:4 rhetoric:1", "Bag addition (BagHash / Bag) works (texas)";
isa_ok ($kb (+) $b), Bag, "... and it's actually a Bag";

# for https://rt.perl.org/Ticket/Display.html?id=122810
ok bag(my @large_arr = ("a"...*)[^50000]), "... a large array goes into a bar - I mean bag - with 50k elems and lives";

# msubset
{
ok $kb $b, "Our keybag is a msubset of our bag";
Expand Down

0 comments on commit d720ab5

Please sign in to comment.