Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode
2012-04-15 16:17:12 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
|
|
|
zci answer_type => 'unicode_conversion';
|
|
|
|
zci is_cached => 1;
|
|
|
|
|
2012-05-05 01:00:23 -07:00
|
|
|
# Raw query, "U+XXXX"
|
Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode
2012-04-15 16:17:12 -07:00
|
|
|
ddg_goodie_test(
|
2012-05-05 01:00:23 -07:00
|
|
|
[qw(DDG::Goodie::Unicode)],
|
Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode
2012-04-15 16:17:12 -07:00
|
|
|
'U+263A' => test_zci("\x{263A} U+263A WHITE SMILING FACE, decimal: 9786, HTML: ☺, UTF-8: 0xE2 0x98 0xBA, block: Miscellaneous Symbols"),
|
|
|
|
);
|
|
|
|
|
2012-05-05 01:00:23 -07:00
|
|
|
# Same should work with the "unicode" start trigger too
|
|
|
|
ddg_goodie_test(
|
|
|
|
[qw(DDG::Goodie::Unicode)],
|
|
|
|
'unicode U+263B' => test_zci("\x{263B} U+263B BLACK SMILING FACE, decimal: 9787, HTML: ☻, UTF-8: 0xE2 0x98 0xBB, block: Miscellaneous Symbols"),
|
|
|
|
);
|
|
|
|
|
|
|
|
# Lookup by name, "unicode LATIN SMALL LETTER A WITH CIRCUMFLEX")
|
|
|
|
ddg_goodie_test(
|
|
|
|
[qw(DDG::Goodie::Unicode)],
|
2012-05-18 13:05:21 -07:00
|
|
|
"unicode White Smiling Face" => test_zci("\x{263A} U+263A WHITE SMILING FACE, decimal: 9786, HTML: ☺, UTF-8: 0xE2 0x98 0xBA, block: Miscellaneous Symbols"),
|
2012-05-05 01:00:23 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
# Lookup by character, "unicode à"
|
|
|
|
ddg_goodie_test(
|
|
|
|
[qw(DDG::Goodie::Unicode)],
|
|
|
|
"unicode \x{263B}" => test_zci("\x{263B} U+263B BLACK SMILING FACE, decimal: 9787, HTML: ☻, UTF-8: 0xE2 0x98 0xBB, block: Miscellaneous Symbols"),
|
|
|
|
);
|
|
|
|
|
Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode
2012-04-15 16:17:12 -07:00
|
|
|
done_testing;
|