summaryrefslogtreecommitdiffstats
path: root/t/001-basic.t
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-01-31 18:15:40 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-01-31 18:15:40 -0500
commit6715794690afdd05f6145165bc2e6e851eb30fb8 (patch)
tree357702906b4f7c8622cef4cc54e51e13ea8691fe /t/001-basic.t
parenta67b45637a95c463661b777d2a4cc0608b5c298a (diff)
downloadgames-word-6715794690afdd05f6145165bc2e6e851eb30fb8.tar.gz
games-word-6715794690afdd05f6145165bc2e6e851eb30fb8.zip
update the tests for the wordlist object
Diffstat (limited to 't/001-basic.t')
-rw-r--r--t/001-basic.t16
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";
+}