summaryrefslogtreecommitdiffstats
path: root/t/array-wordlist.t
blob: f949860b8e66305c75e015c4324edb68d17f7ebd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;

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");

done_testing;