parent
5ce2486225
commit
f280d574f4
|
@ -34,7 +34,7 @@ handle remainder => sub {
|
||||||
(?<lat>$lat_lon_regex[NS])\s
|
(?<lat>$lat_lon_regex[NS])\s
|
||||||
(?<lon>$lat_lon_regex[EW])\s?
|
(?<lon>$lat_lon_regex[EW])\s?
|
||||||
)?
|
)?
|
||||||
(?:on|for)?\s?
|
(?:on|for|at)?\s?
|
||||||
(?<when>$datestring_regex)?
|
(?<when>$datestring_regex)?
|
||||||
$/xi;
|
$/xi;
|
||||||
|
|
||||||
|
|
28
t/SunInfo.t
28
t/SunInfo.t
|
@ -126,6 +126,34 @@ ddg_goodie_test(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
'sunset 7th of march 2017' => test_zci("On 07 Mar 2017, sunrise in Phoenixville, Pennsylvania is at 6:24 AM; sunset at 6:00 PM",
|
||||||
|
structured_answer => {
|
||||||
|
data => ignore(),
|
||||||
|
templates => {
|
||||||
|
group => 'text',
|
||||||
|
item => 0,
|
||||||
|
options => {
|
||||||
|
title_content => 'DDH.sun_info.title',
|
||||||
|
content => 'DDH.sun_info.content'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
),
|
||||||
|
'sunset at 7 March 2017' => test_zci("On 07 Mar 2017, sunrise in Phoenixville, Pennsylvania is at 6:24 AM; sunset at 6:00 PM",
|
||||||
|
structured_answer => {
|
||||||
|
data => ignore(),
|
||||||
|
templates => {
|
||||||
|
group => 'text',
|
||||||
|
item => 0,
|
||||||
|
options => {
|
||||||
|
title_content => 'DDH.sun_info.title',
|
||||||
|
content => 'DDH.sun_info.content'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
'sunset for philly' => undef,
|
'sunset for philly' => undef,
|
||||||
'sunrise on mars' => undef,
|
'sunrise on mars' => undef,
|
||||||
'sunset boulevard' => undef,
|
'sunset boulevard' => undef,
|
||||||
|
|
Loading…
Reference in New Issue