Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
LHC: Limiting overtriggering (#4462)
Browse files Browse the repository at this point in the history
* HasLHC: Adding failing tests for improper trigger type

* LHC: We want start to limit overtriggering and only if there isn't other information in the query
  • Loading branch information
mintsoft authored and moollaza committed Aug 28, 2017
1 parent 9b128b8 commit a46679a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/DDG/Goodie/HasLHCDestroyedWorld.pm
Expand Up @@ -8,14 +8,14 @@ use strict;
zci answer_type => 'has_lhcdestroyed_world';
zci is_cached => 1;

triggers any => 'has the large hadron collider destroyed the world',
triggers start => 'has the large hadron collider destroyed the world',
'has the lhc destroyed the world',
'has the large hadron collider destroyed the earth',
'has the lhc destroyed the earth';

# Handle statement
handle remainder => sub {

return unless /^(yet)?$/;
return "Nope.",
structured_answer => {
id => 'has_lhcdestroyed_world',
Expand Down
2 changes: 1 addition & 1 deletion t/HasLHCDestroyedWorld.t
Expand Up @@ -40,7 +40,7 @@ ddg_goodie_test(
'has the lhc destroyed the earth yet' => test_zci(@no),
'has the lhc destroyed the earth' => test_zci(@no),


'in science fiction has the large hadron collider destroyed the world' => undef,
'large hadron collider' => undef,
'could the large hadron collider destroyed the world' => undef,
'will the large hadron collider destroy the earth' => undef
Expand Down

0 comments on commit a46679a

Please sign in to comment.