diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-11-17 00:29:08 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-11-17 00:29:08 -0600 |
commit | beb5c4cccf9eff7885cbc0253f17a243cce54a4f (patch) | |
tree | e380ed9e7c3d7294b0d67bab15aba4980f42f1e8 /t/002-array-wordlist.t | |
parent | 5c83076fed12c431a9345ba9feb41047966428c4 (diff) | |
download | games-word-beb5c4cccf9eff7885cbc0253f17a243cce54a4f.tar.gz games-word-beb5c4cccf9eff7885cbc0253f17a243cce54a4f.zip |
clean up a bunch of tests
Diffstat (limited to 't/002-array-wordlist.t')
-rw-r--r-- | t/002-array-wordlist.t | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/002-array-wordlist.t b/t/002-array-wordlist.t new file mode 100644 index 0000000..4f235c0 --- /dev/null +++ b/t/002-array-wordlist.t @@ -0,0 +1,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"); |