Class: AnyAsciiTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/any_ascii_test.rb

Instance Method Summary collapse

Instance Method Details

#check(s, expected) ⇒ Object



40
41
42
# File 'lib/any_ascii_test.rb', line 40

def check(s, expected)
	assert_equal(expected, AnyAscii.transliterate(s))
end

#test_transliterateObject



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
# File 'lib/any_ascii_test.rb', line 5

def test_transliterate
	check("", "")
	check("René François Lacôte", "Rene Francois Lacote")
	check("Großer Hörselberg", "Grosser Horselberg")
	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("دمنهور", "dmnhwr")
	check("אברהם הלוי פרנקל", "'vrhm hlvy frnkl")
	check("სამტრედია", "samt'redia")
	check("Աբովյան", "Abovyan")
	check("สงขลา", "sngkhla")
	check("ສະຫວັນນະເຂດ", "sahvannaekhd")
	check("深圳", "ShenZhen")
	check("深水埗", "ShenShuiBu")
	check("화성시", "hwaseongsi")
	check("華城市", "HuaChengShi")
	check("さいたま", "saitama")
	check("埼玉県", "QiYuXian")
	check("トヨタ", "toyota")
	check("⠠⠎⠁⠽⠀⠭⠀⠁⠛", "^say x ag")
	check("ময়মনসিংহ", "mymnsimh")
	check("પોરબંદર", "porbmdr")
	check("महासमुंद", "mhasmumd")
	check("ಬೆಂಗಳೂರು", "bemgluru")
	check("കളമശ്ശേരി", "klmsseri")
	check("ਜਲੰਧਰ", "jlmdhr")
	check("ଗଜପତି", "gjpti")
	check("රත්නපුර", "rtnpur")
	check("கன்னியாகுமரி", "knniyakumri")
	check("శ్రీకాకుళం", "srikakulm")
end