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

Commit 769f3ca

Browse files
committed
Add additional triggers (variations on shēngxiào)
1 parent f73dd07 commit 769f3ca

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/DDG/Goodie/ChineseZodiac.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use DateTime::Event::Chinese qw(chinese_new_year_before chinese_new_year_after);
77
use utf8;
88
use feature 'state';
99

10-
triggers any => 'chinese zodiac';
10+
triggers any => 'chinese zodiac', 'shēngxiào', 'shengxiao', 'shēng xiào', 'sheng xiao';
1111
zci is_cached => 1;
1212

1313
name 'Chinese Zodiac';

t/ChineseZodiac.t

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use strict;
44
use warnings;
55
use Test::More;
66
use DDG::Test::Goodie;
7+
use utf8;
78

89
zci answer_type => 'chinesezodiac';
910
zci is_cached => 1;
@@ -29,6 +30,12 @@ ddg_goodie_test(
2930
'chinese zodiac for a person born in 1969' => test_zci('Rooster', html => qr/Rooster/),
3031
'chinese zodiac of 1969' => test_zci('Rooster', html => qr/Rooster/),
3132

33+
#Alternative triggers
34+
'1969 shēngxiào' => test_zci('Rooster', html => qr/Rooster/),
35+
'shengxiao animal 1969' => test_zci('Rooster', html => qr/Rooster/),
36+
'shēng xiào for 1969' => test_zci('Rooster', html => qr/Rooster/),
37+
'i was born in 1969 what is my sheng xiao' => test_zci('Rooster', html => qr/Rooster/),
38+
3239
#Test some different years
3340
# Taken from http://www.chinesezodiac.com/calculator.php
3441
'chinese zodiac animal for 1924' => test_zci('Rat', html => qr/Rat/),

0 commit comments

Comments
 (0)