2014-10-19 11:45:33 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
2014-10-29 08:47:46 -07:00
|
|
|
zci answer_type => "independence_day";
|
2014-10-19 11:45:33 -07:00
|
|
|
zci is_cached => 1;
|
|
|
|
|
|
|
|
ddg_goodie_test(
|
|
|
|
[qw(
|
2014-10-29 08:47:46 -07:00
|
|
|
DDG::Goodie::IndependenceDay
|
2014-10-19 11:45:33 -07:00
|
|
|
)],
|
2014-10-29 08:47:46 -07:00
|
|
|
# primary example queries
|
2014-10-30 03:56:22 -07:00
|
|
|
'what is the independence day of norway' => test_zci('Norway assumed independence on May 17th, 1814', html=>qr/.*/),
|
|
|
|
'independence day, papua new guinea' => test_zci('Papua New Guinea assumed independence on September 16th, 1975', html=>qr/.*/),
|
2014-10-29 08:47:46 -07:00
|
|
|
# question marks
|
2014-10-30 03:56:22 -07:00
|
|
|
'what is the independence day of norway?' => test_zci('Norway assumed independence on May 17th, 1814', html=>qr/.*/),
|
2014-10-29 08:47:46 -07:00
|
|
|
# miscellaneous
|
2014-10-30 03:56:22 -07:00
|
|
|
'independence day of papua new guinea' => test_zci('Papua New Guinea assumed independence on September 16th, 1975', html=>qr/.*/),
|
|
|
|
'day of independence of sri lanka' => test_zci('Sri Lanka assumed independence on February 4th, 1948', html=>qr/.*/),
|
|
|
|
'when is the day of independence for norway' => test_zci('Norway assumed independence on May 17th, 1814', html=>qr/.*/),
|
|
|
|
'day of independence, norway' => test_zci('Norway assumed independence on May 17th, 1814', html=>qr/.*/),
|
|
|
|
'norway independence day' => test_zci('Norway assumed independence on May 17th, 1814', html=>qr/.*/),
|
|
|
|
'what day is the independence day of norway' => test_zci('Norway assumed independence on May 17th, 1814', html=>qr/.*/),
|
2014-10-29 08:47:46 -07:00
|
|
|
|
2014-10-19 11:45:33 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|