Module:aii-conj/testcases

From Wiktionary, the free dictionary
Jump to navigation Jump to search

All tests passed. (refresh)

TextExpectedActualDiffers at
test_conj:
Passedܡܲܥܒܸܕ݂{{aii-conj-verb/C-strong|ܥ|ܒ|ܕ݂}}{{aii-conj-verb/C-strong|ܥ|ܒ|ܕ݂}}
Passedܡܲܚܹܐ{{aii-conj-verb/C-weak-2d-3i|ܚ}}{{aii-conj-verb/C-weak-2d-3i|ܚ}}
Passedܡܲܥܠܹܐ{{aii-conj-verb/C-weak-3i|ܥ|ܠ}}{{aii-conj-verb/C-weak-3i|ܥ|ܠ}}
Passedܡܲܠܸܦ{{aii-conj-verb/C-weak-d|ܠ|ܦ}}{{aii-conj-verb/C-weak-d|ܠ|ܦ}}
Passedܡܲܥܝܸܕ݂{{aii-conj-verb/C-weak-m|ܥ|ܕ݂}}{{aii-conj-verb/C-weak-m|ܥ|ܕ݂}}
Passedܡܥܲܕܸܢ{{aii-conj-verb/D-strong|ܥ|ܕ|ܢ}}{{aii-conj-verb/D-strong|ܥ|ܕ|ܢ}}
Passedܡܐܲܣܹܐ{{aii-conj-verb/D-weak-3i|ܐ|ܣ}}{{aii-conj-verb/D-weak-3i|ܐ|ܣ}}
Passedܥܵܕ݂ܹܪ{{aii-conj-verb/G-strong|ܥ|ܕ݂|ܪ}}{{aii-conj-verb/G-strong|ܥ|ܕ݂|ܪ}}
Passedܐܵܟ̰ܹܡ{{aii-conj-verb/G-weak-1i|ܟ̰|ܡ}}{{aii-conj-verb/G-weak-1i|ܟ̰|ܡ}}
Passedܥܵܐܹܠ{{aii-conj-verb/G-weak-2i|ܥ|ܠ}}{{aii-conj-verb/G-weak-2i|ܥ|ܠ}}
Passedܥܵܢܹܐ{{aii-conj-verb/G-weak-3i|ܥ|ܢ}}{{aii-conj-verb/G-weak-3i|ܥ|ܢ}}
Passedܡܸܬ݂ܟܬ݂ܹܒ݂{{aii-conj-verb/Gt-strong|ܟ|ܬ݂|ܒ݂}}{{aii-conj-verb/Gt-strong|ܟ|ܬ݂|ܒ݂}}
Passedܡܐܲܪܓܘܸܢ{{aii-conj-verb/Penta-strong|ܐ|ܪ|ܓ|ܘ|ܢ}}{{aii-conj-verb/Penta-strong|ܐ|ܪ|ܓ|ܘ|ܢ}}
Passedܡܥܲܠܬܸܢ{{aii-conj-verb/Q-strong|ܥ|ܠ|ܬ|ܢ}}{{aii-conj-verb/Q-strong|ܥ|ܠ|ܬ|ܢ}}
Passedܡܦܲܪܓܹܐ{{aii-conj-verb/Q-weak|ܦ|ܪ|ܓ}}{{aii-conj-verb/Q-weak|ܦ|ܪ|ܓ}}
Passedܡܸܫܬܲܒ݂ܗܸܪ{{aii-conj-verb/Qi-strong|ܒ݂|ܗ|ܪ}}{{aii-conj-verb/Qi-strong|ܒ݂|ܗ|ܪ}}
Passedܛܵܐܹܒ݂{{aii-conj-verb/G-strong|ܛ|ܐ|ܒ݂}}{{aii-conj-verb/G-strong|ܛ|ܐ|ܒ݂}}
Passedܝܵܐܹܒ݂{{aii-conj-verb/G-strong|ܝ|ܐ|ܒ݂}}{{aii-conj-verb/G-strong|ܝ|ܐ|ܒ݂}}
Passedܗܵܘܹܐ{{aii-conj-haweh}}{{aii-conj-haweh}}
Passedܐܵܬ݂ܹܐ{{aii-conj-verb/atheh}}{{aii-conj-verb/atheh}}
Passedܐܵܙܹܠ{{aii-conj-verb/azel}}{{aii-conj-verb/azel}}
Passedܝܵܗ݇ܒ݂ܹܠ{{aii-conj-verb/yavel}}{{aii-conj-verb/yavel}}

local tests = require("Module:UnitTests")
local _conj = require "Module:aii-conj"._conj

function str_literal_testcase(result)
    local str_result = "{{" .. result.title
    for _, arg in ipairs(result.args) do
        str_result = str_result .. "|" .. arg
    end
    str_result = str_result .. "}}"
    
    return str_result
end


local function tag(text)
	return '<span>' .. text .. '</span>'
end

function tests:test_conj()
	self:iterate({
        {'ܡܲܥܒܸܕ݂', '{{aii-conj-verb/C-strong|ܥ|ܒ|ܕ݂}}'},
        {'ܡܲܚܹܐ', '{{aii-conj-verb/C-weak-2d-3i|ܚ}}'},
        {'ܡܲܥܠܹܐ', '{{aii-conj-verb/C-weak-3i|ܥ|ܠ}}'},
        {'ܡܲܠܸܦ', '{{aii-conj-verb/C-weak-d|ܠ|ܦ}}'},
        {'ܡܲܥܝܸܕ݂', '{{aii-conj-verb/C-weak-m|ܥ|ܕ݂}}'},
        {'ܡܥܲܕܸܢ', '{{aii-conj-verb/D-strong|ܥ|ܕ|ܢ}}'},
        {'ܡܐܲܣܹܐ', '{{aii-conj-verb/D-weak-3i|ܐ|ܣ}}'},
        {'ܥܵܕ݂ܹܪ', '{{aii-conj-verb/G-strong|ܥ|ܕ݂|ܪ}}'},
        {'ܐܵܟ̰ܹܡ', '{{aii-conj-verb/G-weak-1i|ܟ̰|ܡ}}'},
        {'ܥܵܐܹܠ', '{{aii-conj-verb/G-weak-2i|ܥ|ܠ}}'},
        {'ܥܵܢܹܐ', '{{aii-conj-verb/G-weak-3i|ܥ|ܢ}}'},
        {'ܡܸܬ݂ܟܬ݂ܹܒ݂', '{{aii-conj-verb/Gt-strong|ܟ|ܬ݂|ܒ݂}}'},
        {'ܡܐܲܪܓܘܸܢ', '{{aii-conj-verb/Penta-strong|ܐ|ܪ|ܓ|ܘ|ܢ}}'},
        {'ܡܥܲܠܬܸܢ', '{{aii-conj-verb/Q-strong|ܥ|ܠ|ܬ|ܢ}}'},
        {'ܡܦܲܪܓܹܐ', '{{aii-conj-verb/Q-weak|ܦ|ܪ|ܓ}}'},
        {'ܡܸܫܬܲܒ݂ܗܸܪ', '{{aii-conj-verb/Qi-strong|ܒ݂|ܗ|ܪ}}'},
        -- Special cases
        {'ܛܵܐܹܒ݂', '{{aii-conj-verb/G-strong|ܛ|ܐ|ܒ݂}}'},
        {'ܝܵܐܹܒ݂', '{{aii-conj-verb/G-strong|ܝ|ܐ|ܒ݂}}'},
        -- Irregular conjugations
        {'ܗܵܘܹܐ', '{{aii-conj-haweh}}'},
        {'ܐܵܬ݂ܹܐ', '{{aii-conj-verb/atheh}}'},
        {'ܐܵܙܹܠ', '{{aii-conj-verb/azel}}'},
        {'ܝܵܗ݇ܒ݂ܹܠ', '{{aii-conj-verb/yavel}}'}
	},
	function(self, example, expected)
		self:equals(tag(example), str_literal_testcase(_conj(example)), expected)
	end)
end

return tests