DuckDuckGo: Update tests.

master
Jag Talon 2014-03-21 15:02:55 -04:00
parent f0a757d2a3
commit 5af778a83c
2 changed files with 8 additions and 8 deletions

View File

@ -74,19 +74,19 @@ my %data_html = (
stickers => "Thanks for the support! Check out the <a href='https://duck.co/help/community/swag'>DuckDuckGo store</a> for t-shirts, stickers, and other items.", stickers => "Thanks for the support! Check out the <a href='https://duck.co/help/community/swag'>DuckDuckGo store</a> for t-shirts, stickers, and other items.",
duck => "<img src='https://duckduckgo.com/assets/logo_header.v101.png' alt='Dax' /><br/>I am the duck. Dax the duck.", duck => "<img src='https://duckduckgo.com/assets/logo_header.v101.png' alt='Dax' /><br/>I am the duck. Dax the duck.",
dax => "<img src='https://duckduckgo.com/assets/logo_header.v101.png' alt='Dax' /><br/>I am the duck. Dax the duck.", dax => "<img src='https://duckduckgo.com/assets/logo_header.v101.png' alt='Dax' /><br/>I am the duck. Dax the duck.",
irc => "DuckDuckGo's official IRC channel is #duckduckgo on irc.freenode.net", irc => "DuckDuckGo's official IRC channel is <a href='http://webchat.freenode.net/?channels=duckduckgo'>#duckduckgo</a> on <a href='http://freenode.net/'>irc.freenode.net</a>",
remove => "To remove DuckDuckGo from your browser, take a look <a href='https://duck.co/help/desktop'>here</a>. Please <a href='https://duckduckgo.com/feedback'>let us know</a> why you are leaving!", remove => "To remove DuckDuckGo from your browser, take a look <a href='https://duck.co/help/desktop'>here</a>. Please <a href='https://duckduckgo.com/feedback'>let us know</a> why you are leaving!",
removing => "To remove DuckDuckGo from your browser, take a look <a href='https://duck.co/help/desktop'>here</a>. Please <a href='https://duckduckgo.com/feedback'>let us know</a> why you are leaving!", removing => "To remove DuckDuckGo from your browser, take a look <a href='https://duck.co/help/desktop'>here</a>. Please <a href='https://duckduckgo.com/feedback'>let us know</a> why you are leaving!",
removal => "To remove DuckDuckGo from your browser, take a look <a href='https://duck.co/help/desktop'>here</a>. Please <a href='https://duckduckgo.com/feedback'>let us know</a> why you are leaving!", removal => "To remove DuckDuckGo from your browser, take a look <a href='https://duck.co/help/desktop'>here</a>. Please <a href='https://duckduckgo.com/feedback'>let us know</a> why you are leaving!",
(map { (map {
$_ => "Zero Click Info is the term DuckDuckGo uses for these boxes, which often provide useful instant answers above traditional results.", $_ => "Zero Click Info is the term DuckDuckGo uses for these boxes, which often provide useful instant answers above traditional results.",
} "zeroclickinfo", "zeroclick", "0click", "0clickinfo", "zero 0") } "zeroclickinfo", "zeroclick", "0click", "0clickinfo", "zero 0", "zero click info", "zero-click info")
); );
zci is_cached => 1; zci is_cached => 1;
handle remainder => sub { handle remainder => sub {
if(defined $data_html{$_}) { if(defined $data_html{lc $_}) {
return "", html => $data_html{$_}; return "", html => $data_html{lc $_};
} }
return; return;
}; };

View File

@ -12,10 +12,10 @@ ddg_goodie_test(
[qw( [qw(
DDG::Goodie::DuckDuckGo DDG::Goodie::DuckDuckGo
)], )],
'Zero-Click Info' => test_zci("Zero Click Info is the term DuckDuckGo uses for these boxes, which often provide useful instant answers above traditional results."), 'duckduckgo Zero-Click Info' => test_zci("", html => "Zero Click Info is the term DuckDuckGo uses for these boxes, which often provide useful instant answers above traditional results."),
'zeroclick' => test_zci("Zero Click Info is the term DuckDuckGo uses for these boxes, which often provide useful instant answers above traditional results."), 'ddg zeroclick' => test_zci("", html => "Zero Click Info is the term DuckDuckGo uses for these boxes, which often provide useful instant answers above traditional results."),
'help' => test_zci("DuckDuckGo's help website: http://dukgo.com/help/", html => "DuckDuckGo's help website: <a href='http://dukgo.com/help/'>http://dukgo.com/help/</a>"), # 'duckduckgo help' => test_zci("DuckDuckGo's help website: http://dukgo.com/help/", html => "DuckDuckGo's help website: <a href='http://dukgo.com/help/'>http://dukgo.com/help/</a>"),
'duckduckgo irc' => test_zci("DuckDuckGo's official IRC channel is #duckduckgo on irc.freenode.net", html => "DuckDuckGo's official IRC channel is <a href='http://webchat.freenode.net/?channels=duckduckgo'>#duckduckgo</a> on <a href='http://freenode.net/'>irc.freenode.net</a>"), 'duckduckgo irc' => test_zci("", html => "DuckDuckGo's official IRC channel is <a href='http://webchat.freenode.net/?channels=duckduckgo'>#duckduckgo</a> on <a href='http://freenode.net/'>irc.freenode.net</a>"),
irc => undef, irc => undef,
); );