Module:User:Lunabunn/ko-pron/testcases

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

8 of 43 tests failed. (refresh)

TextExpectedActual
test_ipa:
Passed법률학
Passed음식값
Passed공산주의 ~ ~
Failed고춧가루 ~
Passed굵다랗다
Passed새해 복많이 받으세요 ~ ~
Passed새해 복 많이 받으세요 ~ ~
Passed한국
Passed상사병
Passed서클
Passed의견란
Failed ~
Passed깻잎 ~ ~
Passed값어치
Passed맞흥정
Passed곧이어
Failed멋있다 ~
Failed뛰어들다 ~ ~ ~ ~
Passed계속 ~ ~
Passed계속되다 ~ ~ ~ ~ ~ ~
Passed세 명
TextExpectedActual
test_pron:
Passed법률학범뉼학범뉼학
Passed음식값음(ː)식깝음(ː)식깝
Passed공산주의공(ː)산주의/공(ː)산주이공(ː)산주의/공(ː)산주이
Failed고춧가루고춛까루/고추까루고춛까루
Passed굵다랗다국(ː)따라타국(ː)따라타
Passed새해 복많이 받으세요새해 봉마니 바드세요/세헤 봉마니 바드세요새해 봉마니 바드세요/세헤 봉마니 바드세요
Passed새해 복 많이 받으세요새해 복 마니 바드세요/세헤 복 마니 바드세요새해 복 마니 바드세요/세헤 복 마니 바드세요
Passed한국한(ː)국한(ː)국
Passed상사병상사뼝상사뼝
Passed서클써클써클
Passed의견란의(ː)견난의(ː)견난
Failed의/에
Passed깻잎깬닙/껜닙깬닙/껜닙
Passed값어치가버치가버치
Passed맞흥정마틍정마틍정
Passed곧이어고디어고디어
Failed멋있다머싣따/머딛따머싣따
Failed뛰어들다뛰어들다/뛰여들다뛰어들다
Passed계속계(ː)속/게(ː)속계(ː)속/게(ː)속
Passed계속되다계(ː)속뛔다/계(ː)속뙤다/게(ː)속뛔다/게(ː)속뙤다계(ː)속뛔다/계(ː)속뙤다/게(ː)속뛔다/게(ː)속뙤다
Passed세 명세(ː) 명세(ː) 명
Passed서예서예서예

local tests = require("Module:UnitTests")
local m = require("Module:User:Lunabunn/ko-pron")

local raw_swap = require("Module:User:Lunabunn/ko-translit").raw_swap
local ko_pron = require("Module:ko-pron")

function parse_arg(arg)
	if not arg then return {} end
	local parsed = {}
	for e in mw.text.gsplit(arg, ",") do
		e = tonumber(e)
		if e then parsed = true end	
	end
	return parsed
end

function tests:pron(text, params)
	for k, v in pairs(params) do
		params = tostring(v)
	end
	local expected = ko_pron.make({  = function () return {={
		 = text,
		 = params.l,
		 = params.com,
		 = params.nn,
		 = params.ui,
		 = params.uie,
		 = params.nobc,
		 = params.ni,
		 = params.bcred,
		 = params.svar,
		 = params.iot,
	}} end })
	_, _, expected = mw.ustring.find(expected, "<li class=\"ko%-pron__ph\">.-%")
	expected = mw.ustring.gsub(expected, "%b<>", "")
	
	params.l = parse_arg(params.l)
	params.com = parse_arg(params.com)
	params.nn = parse_arg((params.nn or "") .. "," .. (params.ni or ""))
	mw.logObject(params.nn)
	params.bcred = parse_arg(params.bcred)
	params.nobc = tonumber(params.nobc)
	
	local actual = m.pron(text, params)

	return self:equals(text, actual, expected, {
		show_difference = true,
	})
end

function tests:ipa(text, params)
	for k, v in pairs(params) do
		params = tostring(v)
	end
	local expected = ko_pron.make({  = function () return {={
		 = text,
		 = params.l,
		 = params.com,
		 = params.nn,
		 = params.ui,
		 = params.uie,
		 = params.nobc,
		 = params.ni,
		 = params.bcred,
		 = params.svar,
		 = params.iot,
	}} end })
	_, _, expected = mw.ustring.find(expected, "<span class=\"IPA\">(.-)</span>")
	
	params.l = parse_arg(params.l)
	params.com = parse_arg(params.com)
	params.nn = parse_arg((params.nn or "") .. "," .. (params.ni or ""))
	params.bcred = parse_arg(params.bcred)
	params.nobc = tonumber(params.nobc)
	
	local actual = m.pron(text, params, true)

	return self:equals(text, actual, expected, {
		show_difference = true,
	})
end

function tests:test_pron()
	self:pron("법률학", {})
	self:pron("음식값", {l=1})
	self:pron("공산주의", {l=1, ui=4})
	self:pron("고춧가루", {nobc=2})
	self:pron("굵다랗다", {l=1})
	self:pron("새해 복많이 받으세요", {})
	self:pron("새해 복 많이 받으세요", {})
	self:pron("한국", {l=1, cap=1})
	self:pron("상사병", {com=2})
	self:pron("서클", {com=0})
	self:pron("의견란", {nn=3, l=1})
	self:pron("의", {uie=1})
	self:pron("깻잎", {ni=2})
	self:pron("값어치", {bcred=1})
	self:pron("맞흥정", {bcred=1})
	self:pron("곧이어", {bcred=1})
	self:pron("멋있다", {svar=1})
	self:pron("뛰어들다", {iot=2})
	self:pron("계속", {l=1})
	self:pron("계속되다", {l=1})
	self:pron("세 명", {l=1})
	self:pron("서예", {})
end

function tests:test_ipa()
	self:ipa("법률학", {})
	self:ipa("음식값", {l=1})
	self:ipa("공산주의", {l=1, ui=4})
	self:ipa("고춧가루", {nobc=2})
	self:ipa("굵다랗다", {l=1})
	self:ipa("새해 복많이 받으세요", {})
	self:ipa("새해 복 많이 받으세요", {})
	self:ipa("한국", {l=1, cap=1})
	self:ipa("상사병", {com=2})
	self:ipa("서클", {com=0})
	self:ipa("의견란", {nn=3, l=1})
	self:ipa("의", {uie=1})
	self:ipa("깻잎", {ni=2})
	self:ipa("값어치", {bcred=1})
	self:ipa("맞흥정", {bcred=1})
	self:ipa("곧이어", {bcred=1})
	self:ipa("멋있다", {svar=1})
	self:ipa("뛰어들다", {iot=2})
	self:ipa("계속", {l=1})
	self:ipa("계속되다", {l=1})
	self:ipa("세 명", {l=1})
end

return tests