2013-05-06 21:26:26 -07:00
#!/usr/bin/env perl
use strict ;
use warnings ;
use Test::More ;
use DDG::Test::Goodie ;
zci is_cached = > 1 ;
zci answer_type = > "unicodefuzzysearch" ;
ddg_goodie_test (
[ qw(
DDG::Goodie:: UnicodeFuzzySearch
) ] ,
# ------
2013-05-12 13:41:11 -07:00
"unicode white heart" = >
test_zci ( "WHITE HEART SUIT: \x{2661} (U+2661)" , html = > "WHITE HEART SUIT: \x{2661} (U+2661)" ) ,
"0f00 unicode" = >
test_zci ( "TIBETAN SYLLABLE OM: \x{0f00} (U+0F00)" , html = > ( "TIBETAN SYLLABLE OM: \x{0f00} (U+0F00)" ) ) ,
2013-05-06 21:26:26 -07:00
# ------
"unicode snowman" = >
2013-05-12 13:41:11 -07:00
test_zci ( " SNOWMAN: \ x { 2603 } ( U + 2603 )
2013-05-06 21:26:26 -07:00
SNOWMAN WITHOUT SNOW: \ x { 26 c4 } ( U + 26 C4 )
BLACK SNOWMAN: \ x { 26 c7 } ( U + 26 C7 ) " ,
2013-05-12 13:41:11 -07:00
html = > "<ul><li>SNOWMAN: \x{2603} (U+2603)</li><li>SNOWMAN WITHOUT SNOW: \x{26c4} (U+26C4)</li><li>BLACK SNOWMAN: \x{26c7} (U+26C7)</li></ul>" ) ,
2013-05-06 21:26:26 -07:00
# ------
"sharp s unicode" = >
2013-05-12 13:41:11 -07:00
test_zci ( " LATIN SMALL LETTER SHARP S: \ x { 00 df } ( U + 00 DF )
2013-05-06 21:26:26 -07:00
LATIN CAPITAL LETTER SHARP S: \ x { 1e9 e } ( U + 1E9 E )
MUSIC SHARP SIGN: \ x { 266 f } ( U + 266 F ) " ,
2013-05-12 13:41:11 -07:00
html = > "<ul><li>LATIN SMALL LETTER SHARP S: \x{00df} (U+00DF)</li><li>LATIN CAPITAL LETTER SHARP S: \x{1e9e} (U+1E9E)</li><li>MUSIC SHARP SIGN: \x{266f} (U+266F)</li></ul>" ) ,
2014-02-10 13:24:52 -08:00
# ------
'unicode black heart' = >
test_zci ( " BLACK HEART SUIT: \ x { 2665 } ( U + 2665 )
HEAVY BLACK HEART: \ x { 2764 } ( U + 2764 )
ROTATED HEAVY BLACK HEART BULLET: \ x { 2765 } ( U + 2765 ) " ,
html = > "<ul><li>BLACK HEART SUIT: \x{2665} (U+2665)</li><li>HEAVY BLACK HEART: \x{2764} (U+2764)</li><li>ROTATED HEAVY BLACK HEART BULLET: \x{2765} (U+2765)</li></ul>" ) ,
# ------
'unicode 2665' = >
test_zci ( "BLACK HEART SUIT: \x{2665} (U+2665)" ,
html = > "BLACK HEART SUIT: \x{2665} (U+2665)" ) ,
2014-08-16 23:37:38 -07:00
# -- emoji : lower bound
'unicode cyclone' = >
test_zci (
2014-08-27 08:39:33 -07:00
qq|CYCLONE: <img src="https://duckduckgo.com/iu/?u=http%3A%2F%2Fwww.emoji-cheat-sheet.com%2Fgraphics%2Femojis%2Fcyclone.png" alt="\x{1F300}" width="20" style="vertical-align:bottom"/> (U+1F300)| ,
html = > qq|CYCLONE: <img src="https://duckduckgo.com/iu/?u=http%3A%2F%2Fwww.emoji-cheat-sheet.com%2Fgraphics%2Femojis%2Fcyclone.png" alt="\x{1F300}" width="20" style="vertical-align:bottom"/> (U+1F300)|
2014-08-16 23:37:38 -07:00
) ,
# -- emoji : upper bound
'unicode left luggage' = >
test_zci (
2014-08-27 08:39:33 -07:00
qq|LEFT LUGGAGE: <img src="https://duckduckgo.com/iu/?u=http%3A%2F%2Fwww.emoji-cheat-sheet.com%2Fgraphics%2Femojis%2Fleft_luggage.png" alt="\x{1F6C5}" width="20" style="vertical-align:bottom"/> (U+1F6C5)| ,
html = > qq|LEFT LUGGAGE: <img src="https://duckduckgo.com/iu/?u=http%3A%2F%2Fwww.emoji-cheat-sheet.com%2Fgraphics%2Femojis%2Fleft_luggage.png" alt="\x{1F6C5}" width="20" style="vertical-align:bottom"/> (U+1F6C5)|
2014-08-16 23:37:38 -07:00
)
2014-02-10 13:24:52 -08:00
) ;
2013-05-06 21:26:26 -07:00
done_testing ;