-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanyascii_test.go
84 lines (78 loc) · 3.09 KB
/
anyascii_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package anyascii
import "testing"
func TestTransliterate(t *testing.T) {
check := func(s string, expected string) {
actual := Transliterate(s)
if actual != expected {
t.Errorf("Expected <%s> got <%s>", expected, actual)
}
}
check("", "")
check("\x00\x01\t\n\x1f ~\x7f", "\x00\x01\t\n\x1f ~\x7f")
check("sample", "sample")
check("\u0080", "")
check("\u00ff", "y")
check("\ue000", "")
check("\uffff", "")
check("\U000e0020", " ")
check("\U000e007e", "~")
check("\U000f0000", "")
check("\U000f0001", "")
check("\U0010ffff", "")
check("René François Lacôte", "Rene Francois Lacote")
check("Blöße", "Blosse")
check("Trần Hưng Đạo", "Tran Hung Dao")
check("Nærøy", "Naeroy")
check("Φειδιππίδης", "Feidippidis")
check("Δημήτρης Φωτόπουλος", "Dimitris Fotopoylos")
check("Борис Николаевич Ельцин", "Boris Nikolaevich El'tsin")
check("Володимир Горбулін", "Volodimir Gorbulin")
check("Търговище", "T'rgovishche")
check("深圳", "ShenZhen")
check("深水埗", "ShenShuiBu")
check("화성시", "HwaSeongSi")
check("華城市", "HuaChengShi")
check("さいたま", "saitama")
check("埼玉県", "QiYuXian")
check("ደብረ ዘይት", "debre zeyt")
check("ደቀምሓረ", "dek'emhare")
check("دمنهور", "dmnhwr")
check("Աբովյան", "Abovyan")
check("სამტრედია", "samt'redia")
check("אברהם הלוי פרנקל", "'vrhm hlvy frnkl")
check("⠠⠎⠁⠽⠀⠭⠀⠁⠛", "+say x ag")
check("ময়মনসিংহ", "mymnsimh")
check("ထန်တလန်", "thntln")
check("પોરબંદર", "porbmdr")
check("महासमुंद", "mhasmumd")
check("ಬೆಂಗಳೂರು", "bemgluru")
check("សៀមរាប", "siemrab")
check("ສະຫວັນນະເຂດ", "sahvannaekhd")
check("കളമശ്ശേരി", "klmsseri")
check("ଗଜପତି", "gjpti")
check("ਜਲੰਧਰ", "jlmdhr")
check("රත්නපුර", "rtnpur")
check("கன்னியாகுமரி", "knniyakumri")
check("శ్రీకాకుళం", "srikakulm")
check("สงขลา", "sngkhla")
check("👑 🌴", ":crown: :palm_tree:")
check("☆ ♯ ♰ ⚄ ⛌", "* # + 5 X")
check("№ ℳ ⅋ ⅍", "No M & A/S")
check("トヨタ", "toyota")
check("ߞߐߣߊߞߙߌ߫", "konakri")
check("𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀", "zarathushtra")
check("ⵜⵉⴼⵉⵏⴰⵖ", "tifinagh")
check("𐍅𐌿𐌻𐍆𐌹𐌻𐌰", "wulfila")
check("ދިވެހި", "dhivehi")
check("ᨅᨔ ᨕᨘᨁᨗ", "bs ugi")
check("ϯⲙⲓⲛϩⲱⲣ", "timinhor")
check("𐐜 𐐢𐐮𐐻𐑊 𐐝𐐻𐐪𐑉", "Dh Litl Star")
check("ꁌꐭꑤ", "pujjytxiep")
check("ⰳⰾⰰⰳⱁⰾⰹⱌⰰ", "glagolica")
check("ᏎᏉᏯ", "SeQuoYa")
check("ㄓㄨㄤ ㄅㄥ ㄒㄧㄠ", "zhuang beng xiao")
check("ꚩꚫꛑꚩꚳ ꚳ꛰ꛀꚧꚩꛂ", "ipareim m'shuoiya")
check("ᓀᐦᐃᔭᐍᐏᐣ", "nehiyawewin")
check("ᠤᠯᠠᠭᠠᠨᠴᠠᠪ", "ulaganqab")
check("𐑨𐑯𐑛𐑮𐑩𐑒𐑤𐑰𐑟 𐑯 𐑞 𐑤𐑲𐑩𐑯", "andr'kliiz n dh lai'n")
}