summaryrefslogtreecommitdiffstats
path: root/t/002-array-wordlist.t
blob: 4f235c0d6671d1e84d70d5681d58f4ff33e95157 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More tests => 3;
use Games::Word::Wordlist;

my @words = qw/foo bar baz/;
my $wl = Games::Word::Wordlist->new(\@words);
is($wl->words, 3, "created the correct number of words in the word list");
$wl->add_words(['zab', 'rab', 'oof', 'foo']);
is($wl->words, 6, "adding words results in the correct number of words");
$wl->remove_words(qw/rab foo quux/);
is($wl->words, 4, "deleting words results in the correct number of words");