Dessert: Update tests.
parent
3836912cf7
commit
5a824d29eb
|
@ -75,7 +75,7 @@ sub begins_with {
|
|||
|
||||
# We're getting the first letter, and we're going to use that as our key.
|
||||
# This should be faster since we don't go through every dessert in the hash.
|
||||
my $letter = substr($query, 0, 1);
|
||||
my $letter = lc substr($query, 0, 1);
|
||||
|
||||
# Check if a value exists given our key.
|
||||
if(exists $desserts{$letter}) {
|
||||
|
|
30
t/Dessert.t
30
t/Dessert.t
|
@ -13,32 +13,32 @@ ddg_goodie_test(
|
|||
'DDG::Goodie::Dessert'
|
||||
],
|
||||
'desserts beginning with a' => test_zci(
|
||||
qr/(.*?) is a dessert that begins with the letter A\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with the letter A\.$/
|
||||
qr/(.*?) is a dessert that begins with 'a'\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with 'a'\.$/
|
||||
),
|
||||
'desserts beginning with A' => test_zci(
|
||||
qr/(.*?) is a dessert that begins with the letter A\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with the letter A\.$/
|
||||
qr/(.*?) is a dessert that begins with 'A'\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with 'A'\.$/
|
||||
),
|
||||
'dessert start with a' => test_zci(
|
||||
qr/(.*?) is a dessert that begins with the letter A\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with the letter A\.$/
|
||||
qr/(.*?) is a dessert that begins with 'a'\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with 'a'\.$/
|
||||
),
|
||||
'desserts starting with a' => test_zci(
|
||||
qr/(.*?) is a dessert that begins with the letter A\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with the letter A\.$/
|
||||
qr/(.*?) is a dessert that begins with 'a'\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with 'a'\.$/
|
||||
),
|
||||
'dessert starts with a' => test_zci(
|
||||
qr/(.*?) is a dessert that begins with the letter A\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with the letter A\.$/
|
||||
qr/(.*?) is a dessert that begins with 'a'\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with 'a'\.$/
|
||||
),
|
||||
'desserts beginning with z' => test_zci(
|
||||
qr/(.*?) is a dessert that begins with the letter Z\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with the letter Z\.$/
|
||||
qr/(.*?) is a dessert that begins with 'z'\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with 'z'\.$/
|
||||
),
|
||||
'a dessert that begins with the letter a' => test_zci(
|
||||
qr/(.*?) is a dessert that begins with the letter A\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with the letter A\.$/
|
||||
'a dessert that begins with a' => test_zci(
|
||||
qr/(.*?) is a dessert that begins with 'a'\.$/,
|
||||
html => qr/(.*?) is a dessert that begins with 'a'\.$/
|
||||
),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue