diff options
Diffstat (limited to 't/004-system-wordlist-nocache.t')
-rw-r--r-- | t/004-system-wordlist-nocache.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/004-system-wordlist-nocache.t b/t/004-system-wordlist-nocache.t index 3692411..7396d51 100644 --- a/t/004-system-wordlist-nocache.t +++ b/t/004-system-wordlist-nocache.t @@ -1,7 +1,7 @@ #!perl -T use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 4; use Test::Exception; use Games::Word::Wordlist; @@ -18,4 +18,11 @@ SKIP: { open my $fh, '<', $word_file or die "Couldn't open $word_file"; for (<$fh>) {} is($wl->words, $., "we read in the correct number of words"); + + throws_ok { $wl->add_words([qw/foo bar baz/]) } + qr/Can't add words to a non-cached word list/, + "adding words dies"; + throws_ok { $wl->remove_words("word", "throw") } + qr/Can't remove words from a non-cached word list/, + "removing words dies"; } |