From 46a035455783962edcad336dc659465620908152 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Sat, 2 Feb 2008 23:36:16 -0500 Subject: fix up tests based on Devel::Cover reports --- t/020-random-word.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 't/020-random-word.t') diff --git a/t/020-random-word.t b/t/020-random-word.t index ad2c830..71b1959 100644 --- a/t/020-random-word.t +++ b/t/020-random-word.t @@ -1,7 +1,7 @@ #!perl -T use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; use Games::Word::Wordlist; my $wl = Games::Word::Wordlist->new(['foo', 'bar', 'baz', 'quux']); @@ -20,3 +20,7 @@ like($word, qr/^(foo|bar|baz)$/, is($wl->random_word(5), undef, "random_word returns undef if no words are found"); + +my $wl2 = Games::Word::Wordlist->new([]); +is($wl2->random_word, undef, + "random word returns undef with an empty word list"); -- cgit v1.2.3-54-g00ecf