X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/15bb2049062870fe167c450dc967e72f84462a41..bfc084c8c47a48b686c79052d01c0a198cc59bc3:/pokedex/tests/test_roomaji.py diff --git a/pokedex/tests/test_roomaji.py b/pokedex/tests/test_roomaji.py new file mode 100644 index 0000000..07a6aa7 --- /dev/null +++ b/pokedex/tests/test_roomaji.py @@ -0,0 +1,28 @@ +# encoding: utf8 +from nose.tools import * +import unittest + +import pokedex.roomaji + + +def test_roomaji(): + tests = [ + (u'ヤミカラス', 'yamikarasu'), + + # Elongated vowel + (u'イーブイ', 'iibui'), + (u'ホーホー', 'hoohoo'), + + # Combined characters + (u'ニャース', 'nyaasu'), + (u'ジャ', 'ja'), + (u'ぎゃくてん', 'gyakuten'), + + # Special katakana combinations + (u'ラティアス', 'ratiasu'), + (u'ウィー', 'wii'), + ] + + for kana, roomaji in tests: + result = pokedex.roomaji.romanize(kana) + assert_equal(result, roomaji, u"'%s' romanizes correctly" % roomaji)