Game2048: Fixed overtriggering (#4473)
* fixed overtriggering in Game2048 * Added two more tests to help fix issue #4473 * Added regex guard in handle function to fix #4473. * modified regex guard for #4473 * Added a test to t/Game2048.t * Removed trailing comma.master
parent
fd2712079b
commit
50bb72dff7
|
@ -9,7 +9,7 @@ triggers start => "2048", "play 2048", "game 2048";
|
||||||
|
|
||||||
handle query_lc => sub {
|
handle query_lc => sub {
|
||||||
|
|
||||||
return unless $_;
|
return unless $_ =~ /^(2048|play 2048|game 2048)(\s+.*)*$/;
|
||||||
|
|
||||||
return '',
|
return '',
|
||||||
structured_answer => {
|
structured_answer => {
|
||||||
|
|
|
@ -40,7 +40,10 @@ ddg_goodie_test(
|
||||||
),
|
),
|
||||||
'what is 2048?' => undef,
|
'what is 2048?' => undef,
|
||||||
'how to play 2048' => undef,
|
'how to play 2048' => undef,
|
||||||
'204823 34232' => undef
|
'204823 34232' => undef,
|
||||||
|
'123:play 2048:12398' => undef,
|
||||||
|
'2400:cb00:2048:1::6817:f2fe' => undef,
|
||||||
|
'2048:6093:99ca:bc7:0:0:0:0' => undef
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue