blob: ca9f004bad36aa73ede0e69a3d4dea363258e320 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
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) {
is_deeply(
[sort split //, random_permutation($word)],
[sort split //, $word],
"random tests"
);
}
}
done_testing;
|