Module:ja/testcases

Hello, you have come here looking for the meaning of the word Module:ja/testcases. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:ja/testcases, but we will also tell you about its etymology, its characteristics and you will know how to say Module:ja/testcases in singular and plural. Everything you need to know about the word Module:ja/testcases you have here. The definition of the word Module:ja/testcases will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:ja/testcases, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

1 of 21 tests failed. (refresh)

TextExpectedActual
test_all:
Passedayekikye vyewifueアイェキキェ ヴィェウィフエアイェキキェ ヴィェウィフエ
Passedshinkansenシンカンセンシンカンセン
Passedshin'iシンイシンイ
Passedshin'ya shinyaシンヤ シニャシンヤ シニャ
Passedna ni nu ne no nya nyu nye nyoナ ニ ヌ ネ ノ ニャ ニュ ニェ ニョナ ニ ヌ ネ ノ ニャ ニュ ニェ ニョ
Passedbakkurasshuバックラッシュバックラッシュ
Passedあいこくしん愛国心メHira+Kana+HaniHira+Kana+Hani
Passedあいこくしん愛国心Hira+HaniHira+Hani
PassedァーKanaKana
PassedあっぷるringoHira+RomajiHira+Romaji
Passedニッポン11Kana+NumberKana+Number
PassedニッポンnipponKana+RomajiKana+Romaji
Passed一つHira+HaniHira+Hani
Passed〆るHira+AbbreviationHira+Abbreviation
Passedアメリカじんあめりかじんあめりかじん
Passedうぃきぺでぃあ デスウィキペディア デスウィキペディア デス
Passedcount_morae: しゃっきんジャー66
Passedrm_spaces_hyphens: ishu kakutōgi senishukakutōgisenishukakutōgisen
Passedkanji_grade: 立11
Failedkanji_grade: 尊立69
Passedkanji_grade: 藉尊立99

-- Unit tests for ]. Click talk page to run tests.
local p = require('Module:UnitTests')
local m = require('Module:ja')

function p:r2k(original, katakana)
	self:equals(original, m.romaji_to_kata(original), katakana)
end

function p:script_detection(original, script)
	self:equals(original, m.script(original), script)
end

function p:k2h(original, hiragana)
	self:equals(original, m.kata_to_hira(original), hiragana)
end

function p:h2k(original, katakana)
	self:equals(original, m.hira_to_kata(original), katakana)
end

function p:other(fun, original, output)
	local mf

	if fun == 'count_morae' then mf = m.count_morae
	elseif fun == 'rm_spaces_hyphens' then mf = m.rm_spaces_hyphens
	elseif fun == 'kanji_grade' then mf = m.kanji_grade
	end

	self:equals(fun .. ': ' .. original, mf(original), output)
end

function p:test_all()
	self:r2k("ayekikye vyewifue", "アイェキキェ ヴィェウィフエ")
	self:r2k("shinkansen", "シンカンセン")
	self:r2k("shin'i", "シンイ")
	self:r2k("shin'ya shinya", "シンヤ シニャ")
	self:r2k("na ni nu ne no nya nyu nye nyo", "ナ ニ ヌ ネ ノ ニャ ニュ ニェ ニョ")
	self:r2k("bakkurasshu", "バックラッシュ")

	self:script_detection('あいこくしん愛国心メ', 'Hira+Kana+Hani')
	self:script_detection('あいこくしん愛国心', 'Hira+Hani')
	self:script_detection('ァー', 'Kana')
	self:script_detection('あっぷるringo', 'Hira+Romaji')
	self:script_detection('ニッポン11', 'Kana+Number')
	self:script_detection('ニッポンnippon', 'Kana+Romaji')
	self:script_detection('一つ', 'Hira+Hani')
	self:script_detection('〆る', 'Hira+Abbreviation')

	self:k2h('アメリカじん', 'あめりかじん')

	self:h2k('うぃきぺでぃあ デス', 'ウィキペディア デス')

	self:other('count_morae', 'しゃっきんジャー', 6)

	self:other('rm_spaces_hyphens', 'ishu kakutōgi sen', 'ishukakutōgisen')

	self:other('kanji_grade', '立', 1)
	self:other('kanji_grade', '尊立', 6)
	self:other('kanji_grade', '藉尊立', 9)
end
 
return p