ensure we handle upper case queries properly
parent
6f0b4d9ac7
commit
dbb9214312
|
@ -48,12 +48,12 @@ my @triggers = map { ("$_", "$_?") } keys %queries;
|
|||
|
||||
triggers start => @triggers;
|
||||
|
||||
handle remainder => sub {
|
||||
handle remainder_lc => sub {
|
||||
|
||||
# ensure no remainder, query == trigger
|
||||
return if $_;
|
||||
|
||||
my $query = $req->matched_trigger;
|
||||
my $query = lc $req->matched_trigger;
|
||||
$query =~ s/\?//;
|
||||
my $answer = $queries{$query}{answer};
|
||||
my $link = $queries{$query}{link};
|
||||
|
|
|
@ -42,6 +42,7 @@ ddg_goodie_test(
|
|||
[qw( DDG::Goodie::HistoricalEvents )],
|
||||
|
||||
'is the moon landing real' => build_test('the Moon landing is real', $moon_landing_url),
|
||||
'is the Moon Landing real' => build_test('the Moon landing is real', $moon_landing_url),
|
||||
'was the moon landing real?' => build_test('the Moon landing was real', $moon_landing_url),
|
||||
'did the moon landing happen' => build_test('the Moon landing happened', $moon_landing_url),
|
||||
'did the moon landing really happen' => build_test('the Moon landing happened', $moon_landing_url),
|
||||
|
|
Loading…
Reference in New Issue