summaryrefslogtreecommitdiffstats
path: root/t/010-random-permutation.t
blob: 4adcda3d03cbf4802112b42522838e2d4d295f1c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More tests => 51;
use Test::Deep;
use Games::Word qw/random_permutation/;

is(random_permutation(""), "", "testing permutation of empty string");

for my $word (qw/foo bar baz quux blah/) {
    for (1..10) {
        cmp_deeply([split //, random_permutation $word], bag(split //, $word),
                   "random tests");
    }
}