diff options
Diffstat (limited to 't/001-basic.t')
-rw-r--r-- | t/001-basic.t | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/t/001-basic.t b/t/001-basic.t index 4043c35..cf5c216 100644 --- a/t/001-basic.t +++ b/t/001-basic.t @@ -1,8 +1,18 @@ #!perl -T use strict; use warnings; -use Test::More tests => 1; -use Games::Word; +use Test::More tests => 2; +use Test::Exception; +use Games::Word::Wordlist; -ok(1); +my $word_file = ''; +$word_file = '/usr/dict/words' if -r '/usr/dict/words'; +$word_file = '/usr/share/dict/words' if -r '/usr/share/dict/words'; +SKIP: { + skip "Can't find a system wordlist", 2 unless $word_file; + my $wl; + lives_ok { $wl = Games::Word::Wordlist->new($word_file) } + "creating a wordlist succeeds"; + isa_ok $wl, "Games::Word::Wordlist"; +} |