Module:pi-conj/verb/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:pi-conj/verb/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
This test checks that standard inflection tables are extracted properly for the Roman script. Other modules are used to test extraction for the Bengali script, the Brahmi script, the Burmese script, the Chakma script, the Devanagari script, the Khmer script, the Lao script with and without implicit vowels, the Sinhalese script, the Tai Tham script, and the Thai script with and without implicit vowels.
The Lua code for those other scripts' testcases invokes the code defined by this module.
All tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
dadāti pres 1 | dadāmi ; dadāma ; dade ; dadāmhe | dadāmi ; dadāma ; dade ; dadāmhe | |
dadāti pres 2 | dadāsi ; dadātha ; dadāse ; dadavhe | dadāsi ; dadātha ; dadāse ; dadavhe | |
dadāti pres 3 | dadāti ; dadanti ; dadāte ; dadante dadāre | dadāti ; dadanti ; dadāte ; dadante dadāre | |
dadāti impf 1 | adada adadaṃ ; adadamhā ; ; | adada adadaṃ ; adadamhā ; ; | |
dadāti impf 2 | adado ; adadattha ; ; | adado ; adadattha ; ; | |
dadāti impf 3 | adada adadā ; adadu adadū ; ; | adada adadā ; adadu adadū ; ; | |
dadāti impr 1 | dadāmi ; dadāma ; ; | dadāmi ; dadāma ; ; | |
dadāti impr 2 | dadā dadāhi ; dadātha ; ; | dadā dadāhi ; dadātha ; ; | |
dadāti impr 3 | dadātu ; dadantu ; ; | dadātu ; dadantu ; ; | |
dadāti opt 1 | dadeyyāmi dadeyyaṃ ; dadeyyāma ; dadeyyaṃ ; dadeyyāmhe | dadeyyāmi dadeyyaṃ ; dadeyyāma ; dadeyyaṃ ; dadeyyāmhe | |
dadāti opt 2 | dadeyyāsi ; dadeyyātha ; dadetho ; dadeyyavho | dadeyyāsi ; dadeyyātha ; dadetho ; dadeyyavho | |
dadāti opt 3 | dadeyya dade ; dadeyyuṃ ; dadetha ; daderaṃ | dadeyya dade ; dadeyyuṃ ; dadetha ; daderaṃ | |
dadāti part | dadant ; dadamāna | dadant ; dadamāna | |
dadāte pres 1 | dade ; dadāmhe | dade ; dadāmhe | |
dadāte pres 2 | dadāse ; dadavhe | dadāse ; dadavhe | |
dadāte pres 3 | dadāte ; dadante dadāre | dadāte ; dadante dadāre | |
dadāte impf 1 | ; | ; | |
dadāte impf 2 | ; | ; | |
dadāte impf 3 | ; | ; | |
dadāte impr 1 | ; | ; | |
dadāte impr 2 | ; | ; | |
dadāte impr 3 | ; | ; | |
dadāte opt 1 | dadeyyāmi dadeyyaṃ ; dadeyyāma ; dadeyyaṃ ; dadeyyāmhe | dadeyyāmi dadeyyaṃ ; dadeyyāma ; dadeyyaṃ ; dadeyyāmhe | |
dadāte opt 2 | dadeyyāsi ; dadeyyātha ; dadetho ; dadeyyavho | dadeyyāsi ; dadeyyātha ; dadetho ; dadeyyavho | |
dadāte opt 3 | dadeyya dade ; dadeyyuṃ ; dadetha ; daderaṃ | dadeyya dade ; dadeyyuṃ ; dadetha ; daderaṃ | |
dadāte part | dadamāna | dadamāna | |
dadāti alt opt a1 | dajjāmi ; dajjāma | dajjāmi ; dajjāma | |
dadāti alt opt a2 | dajjāsi ; dajjātha | dajjāsi ; dajjātha | |
dadāti alt opt a3 | dajjā ; dajjuṃ | dajjā ; dajjuṃ |
Text | Expected | Actual | |
---|---|---|---|
pacati pres 1 | pacāmi ; pacāma ; pace ; pacāmhe | pacāmi ; pacāma ; pace ; pacāmhe | |
pacati pres 2 | pacasi ; pacatha ; pacase ; pacavhe | pacasi ; pacatha ; pacase ; pacavhe | |
pacati pres 3 | pacati ; pacanti ; pacate ; pacante pacare | pacati ; pacanti ; pacate ; pacante pacare | |
pacati impf 1 | apaca apacaṃ ; apacamhā ; apaciṃ ; apacāmhase apacamhase | apaca apacaṃ ; apacamhā ; apaciṃ ; apacāmhase apacamhase | |
pacati impf 2 | apaco ; apacattha ; apacase ; apacavhaṃ | apaco ; apacattha ; apacase ; apacavhaṃ | |
pacati impf 3 | apaca apacā ; apacu apacū ; apacattha ; apacatthuṃ | apaca apacā ; apacu apacū ; apacattha ; apacatthuṃ | |
pacati impr 1 | pacāmi ; pacāma ; pace ; pacāmase | pacāmi ; pacāma ; pace ; pacāmase | |
pacati impr 2 | paca pacāhi ; pacatha ; pacassu ; pacavho | paca pacāhi ; pacatha ; pacassu ; pacavho | |
pacati impr 3 | pacatu ; pacantu ; pacataṃ ; pacantaṃ | pacatu ; pacantu ; pacataṃ ; pacantaṃ | |
pacati opt 1 | paceyyāmi paceyyaṃ pace ; paceyyāma ; paceyyaṃ ; paceyyāmhe | paceyyāmi paceyyaṃ pace ; paceyyāma ; paceyyaṃ ; paceyyāmhe | |
pacati opt 2 | paceyyāsi pace ; paceyyātha ; pacetho ; paceyyavho | paceyyāsi pace ; paceyyātha ; pacetho ; paceyyavho | |
pacati opt 3 | paceyya pace ; paceyyuṃ ; pacetha ; paceraṃ | paceyya pace ; paceyyuṃ ; pacetha ; paceraṃ | |
pacati part | pacant ; pacamāna | pacant ; pacamāna | |
pacate pres 1 | pace ; pacāmhe | pace ; pacāmhe | |
pacate pres 2 | pacase ; pacavhe | pacase ; pacavhe | |
pacate pres 3 | pacate ; pacante pacare | pacate ; pacante pacare | |
pacate impf 1 | apaciṃ ; apacāmhase apacamhase | apaciṃ ; apacāmhase apacamhase | |
pacate impf 2 | apacase ; apacavhaṃ | apacase ; apacavhaṃ | |
pacate impf 3 | apacattha ; apacatthuṃ | apacattha ; apacatthuṃ | |
pacate impr 1 | pace ; pacāmase | pace ; pacāmase | |
pacate impr 2 | pacassu ; pacavho | pacassu ; pacavho | |
pacate impr 3 | pacataṃ ; pacantaṃ | pacataṃ ; pacantaṃ | |
pacate opt 1 | paceyyāmi paceyyaṃ pace ; paceyyāma ; paceyyaṃ ; paceyyāmhe | paceyyāmi paceyyaṃ pace ; paceyyāma ; paceyyaṃ ; paceyyāmhe | |
pacate opt 2 | paceyyāsi pace ; paceyyātha ; pacetho ; paceyyavho | paceyyāsi pace ; paceyyātha ; pacetho ; paceyyavho | |
pacate opt 3 | paceyya pace ; paceyyuṃ ; pacetha ; paceraṃ | paceyya pace ; paceyyuṃ ; pacetha ; paceraṃ | |
pacate part | pacamāna | pacamāna | |
apaca impf 1 | apaca apacaṃ ; apacamhā ; apaciṃ ; apacāmhase apacamhase | apaca apacaṃ ; apacamhā ; apaciṃ ; apacāmhase apacamhase | |
apaca impf 2 | apaco ; apacattha ; apacase ; apacavhaṃ | apaco ; apacattha ; apacase ; apacavhaṃ | |
apaca impf 3 | apaca apacā ; apacu apacū ; apacattha ; apacatthuṃ | apaca apacā ; apacu apacū ; apacattha ; apacatthuṃ | |
apacattha impf m1 | apaciṃ ; apacāmhase apacamhase | apaciṃ ; apacāmhase apacamhase | |
apacattha impf m2 | apacase ; apacavhaṃ | apacase ; apacavhaṃ | |
apacattha impf m3 | apacattha ; apacatthuṃ | apacattha ; apacatthuṃ | |
paceyya opt 1 | paceyyāmi paceyyaṃ ; paceyyāma ; paceyyaṃ ; paceyyāmhe | paceyyāmi paceyyaṃ ; paceyyāma ; paceyyaṃ ; paceyyāmhe | |
paceyya opt 2 | paceyyāsi ; paceyyātha ; pacetho ; paceyyavho | paceyyāsi ; paceyyātha ; pacetho ; paceyyavho | |
paceyya opt 3 | paceyya ; paceyyuṃ ; pacetha ; paceraṃ | paceyya ; paceyyuṃ ; pacetha ; paceraṃ | |
pacetha opt m1 | paceyyaṃ ; paceyyāmhe | paceyyaṃ ; paceyyāmhe | |
pacetha opt m2 | pacetho ; paceyyavho | pacetho ; paceyyavho | |
pacetha opt m3 | pacetha ; paceraṃ | pacetha ; paceraṃ |
Text | Expected | Actual | |
---|---|---|---|
corayati pres 1 | corayāmi ; corayāma ; coraye ; corayāmhe | corayāmi ; corayāma ; coraye ; corayāmhe | |
corayati pres 2 | corayasi ; corayatha ; corayase ; corayavhe | corayasi ; corayatha ; corayase ; corayavhe | |
corayati pres 3 | corayati ; corayanti ; corayate ; corayante corayare | corayati ; corayanti ; corayate ; corayante corayare | |
corayati impf 1 | coraya corayaṃ ; corayamhā ; corayiṃ ; corayāmhase corayamhase | coraya corayaṃ ; corayamhā ; corayiṃ ; corayāmhase corayamhase | |
corayati impf 2 | corayo ; corayattha ; corayase ; corayavhaṃ | corayo ; corayattha ; corayase ; corayavhaṃ | |
corayati impf 3 | coraya corayā ; corayu corayū ; corayattha ; corayatthuṃ | coraya corayā ; corayu corayū ; corayattha ; corayatthuṃ | |
corayati impr 1 | corayāmi ; corayāma ; coraye ; corayāmase | corayāmi ; corayāma ; coraye ; corayāmase | |
corayati impr 2 | corayāhi ; corayatha ; corayassu ; corayavho | corayāhi ; corayatha ; corayassu ; corayavho | |
corayati impr 3 | corayatu ; corayantu ; ; corayantaṃ | corayatu ; corayantu ; ; corayantaṃ | |
corayati opt 1 | corayeyyāmi corayeyyaṃ ; corayeyyāma ; corayeyyaṃ ; corayeyyāmhe | corayeyyāmi corayeyyaṃ ; corayeyyāma ; corayeyyaṃ ; corayeyyāmhe | |
corayati opt 2 | corayeyyāsi ; corayeyyātha ; corayetho ; corayeyyavho | corayeyyāsi ; corayeyyātha ; corayetho ; corayeyyavho | |
corayati opt 3 | corayeyya coraye ; corayeyyuṃ ; corayetha ; corayeraṃ | corayeyya coraye ; corayeyyuṃ ; corayetha ; corayeraṃ | |
corayati part | corayant ; corayamāna | corayant ; corayamāna | |
corayate pres 1 | coraye ; corayāmhe | coraye ; corayāmhe | |
corayate pres 2 | corayase ; corayavhe | corayase ; corayavhe | |
corayate pres 3 | corayate ; corayante corayare | corayate ; corayante corayare | |
corayate impf 1 | corayiṃ ; corayāmhase corayamhase | corayiṃ ; corayāmhase corayamhase | |
corayate impf 2 | corayase ; corayavhaṃ | corayase ; corayavhaṃ | |
corayate impf 3 | corayattha ; corayatthuṃ | corayattha ; corayatthuṃ | |
corayate impr 1 | coraye ; corayāmase | coraye ; corayāmase | |
corayate impr 2 | corayassu ; corayavho | corayassu ; corayavho | |
corayate impr 3 | ; corayantaṃ | ; corayantaṃ | |
corayate opt 1 | corayeyyāmi corayeyyaṃ ; corayeyyāma ; corayeyyaṃ ; corayeyyāmhe | corayeyyāmi corayeyyaṃ ; corayeyyāma ; corayeyyaṃ ; corayeyyāmhe | |
corayate opt 2 | corayeyyāsi ; corayeyyātha ; corayetho ; corayeyyavho | corayeyyāsi ; corayeyyātha ; corayetho ; corayeyyavho | |
corayate opt 3 | corayeyya coraye ; corayeyyuṃ ; corayetha ; corayeraṃ | corayeyya coraye ; corayeyyuṃ ; corayetha ; corayeraṃ | |
corayate part | corayamāna | corayamāna | |
coraya impf 1 | coraya corayaṃ ; corayamhā ; corayiṃ ; corayāmhase corayamhase | coraya corayaṃ ; corayamhā ; corayiṃ ; corayāmhase corayamhase | |
coraya impf 2 | corayo ; corayattha ; corayase ; corayavhaṃ | corayo ; corayattha ; corayase ; corayavhaṃ | |
coraya impf 3 | coraya corayā ; corayu corayū ; corayattha ; corayatthuṃ | coraya corayā ; corayu corayū ; corayattha ; corayatthuṃ | |
corayattha impf m1 | corayiṃ ; corayāmhase corayamhase | corayiṃ ; corayāmhase corayamhase | |
corayattha impf m2 | corayase ; corayavhaṃ | corayase ; corayavhaṃ | |
corayattha impf m3 | corayattha ; corayatthuṃ | corayattha ; corayatthuṃ |
Text | Expected | Actual | |
---|---|---|---|
coreti pres 1 | coremi ; corema ; ; | coremi ; corema ; ; | |
coreti pres 2 | coresi ; coretha ; ; | coresi ; coretha ; ; | |
coreti pres 3 | coreti ; corenti ; ; | coreti ; corenti ; ; | |
coreti impf 1 | ; ; ; | ; ; ; | |
coreti impf 2 | ; ; ; | ; ; ; | |
coreti impf 3 | ; ; ; | ; ; ; | |
coreti impr 1 | coremi ; corema ; ; | coremi ; corema ; ; | |
coreti impr 2 | corehi ; coretha ; ; | corehi ; coretha ; ; | |
coreti impr 3 | coretu ; corentu ; ; | coretu ; corentu ; ; | |
coreti opt 1 | coreyyāmi coreyyaṃ ; coreyyāma ; coreyyaṃ ; coreyyāmhe | coreyyāmi coreyyaṃ ; coreyyāma ; coreyyaṃ ; coreyyāmhe | |
coreti opt 2 | coreyyāsi ; coreyyātha ; coretho ; coreyyavho | coreyyāsi ; coreyyātha ; coretho ; coreyyavho | |
coreti opt 3 | coreyya ; coreyyuṃ ; coretha ; coreraṃ | coreyya ; coreyyuṃ ; coretha ; coreraṃ | |
coreti part | corent ; | corent ; | |
corete pres 1 | coraye ; corayāmhe | coraye ; corayāmhe | |
corete pres 2 | corayase ; corayavhe | corayase ; corayavhe | |
corete pres 3 | corayate ; corayante corayare | corayate ; corayante corayare | |
corete impf 1 | ; | ; | |
corete impf 2 | ; | ; | |
corete impf 3 | ; | ; | |
corete impr 1 | coraye ; corayāmase | coraye ; corayāmase | |
corete impr 2 | corayassu ; corayavho | corayassu ; corayavho | |
corete impr 3 | ; corayantaṃ | ; corayantaṃ | |
corete opt 1 | coreyyāmi coreyyaṃ ; coreyyāma ; coreyyaṃ ; coreyyāmhe | coreyyāmi coreyyaṃ ; coreyyāma ; coreyyaṃ ; coreyyāmhe | |
corete opt 2 | coreyyāsi ; coreyyātha ; coretho ; coreyyavho | coreyyāsi ; coreyyātha ; coretho ; coreyyavho | |
corete opt 3 | coreyya ; coreyyuṃ ; coretha ; coreraṃ | coreyya ; coreyyuṃ ; coretha ; coreraṃ | |
corete part | corayamāna | corayamāna |
Text | Expected | Actual | |
---|---|---|---|
heti futu1 | hemi ; hema ; ; | hemi ; hema ; ; | |
heti futu2 | hesi ; hetha ; ; | hesi ; hetha ; ; | |
heti futu3 | heti ; henti ; ; | heti ; henti ; ; |
Text | Expected | Actual | |
---|---|---|---|
agamissa cond1 | agamissaṃ ; ; agamissaṃ ; agamissāmhase | agamissaṃ ; ; agamissaṃ ; agamissāmhase | |
agamissa cond2 | agamissa agamissi ; agamissatha ; agamisse agamissase ; agamissavhe | agamissa agamissi ; agamissatha ; agamisse agamissase ; agamissavhe | |
agamissa cond3 | agamissā agamissa ; agamissaṃsu ; agamissatha ; agamissiṃsu | agamissā agamissa ; agamissaṃsu ; agamissatha ; agamissiṃsu | |
agamissā cond1 | agamissaṃ ; ; agamissaṃ ; agamissāmhase | agamissaṃ ; ; agamissaṃ ; agamissāmhase | |
agamissā cond2 | agamissa agamissi ; agamissatha ; agamisse agamissase ; agamissavhe | agamissa agamissi ; agamissatha ; agamisse agamissase ; agamissavhe | |
agamissā cond3 | agamissā agamissa ; agamissaṃsu ; agamissatha ; agamissiṃsu | agamissā agamissa ; agamissaṃsu ; agamissatha ; agamissiṃsu | |
agamissatha cond1 | agamissaṃ ; agamissāmhase | agamissaṃ ; agamissāmhase | |
agamissatha cond2 | agamisse agamissase ; agamissavhe | agamisse agamissase ; agamissavhe | |
agamissatha cond3 | agamissatha ; agamissiṃsu | agamissatha ; agamissiṃsu |
Text | Expected | Actual | |
---|---|---|---|
pacissati fut1 | pacissāmi ; pacissāma ; pacissaṃ ; pacissāmhe | pacissāmi ; pacissāma ; pacissaṃ ; pacissāmhe | |
pacissati fut2 | pacissasi ; pacissatha ; pacissase ; pacissavhe | pacissasi ; pacissatha ; pacissase ; pacissavhe | |
pacissati fut3 | pacissati ; pacissanti ; pacissate ; pacissante | pacissati ; pacissanti ; pacissate ; pacissante | |
pacissati cond1 | apacissaṃ ; ; apacissaṃ ; apacissāmhase | apacissaṃ ; ; apacissaṃ ; apacissāmhase | |
pacissati cond2 | apacissa apacissi ; apacissatha ; apacisse apacissase ; apacissavhe | apacissa apacissi ; apacissatha ; apacisse apacissase ; apacissavhe | |
pacissati cond3 | apacissā apacissa ; apacissaṃsu ; apacissatha ; apacissiṃsu | apacissā apacissa ; apacissaṃsu ; apacissatha ; apacissiṃsu | |
pacissate fut1 | pacissaṃ ; pacissāmhe | pacissaṃ ; pacissāmhe | |
pacissate fut2 | pacissase ; pacissavhe | pacissase ; pacissavhe | |
pacissate fut3 | pacissate ; pacissante | pacissate ; pacissante | |
pacissate cond1 | apacissaṃ ; apacissāmhase | apacissaṃ ; apacissāmhase | |
pacissate cond2 | apacisse apacissase ; apacissavhe | apacisse apacissase ; apacissavhe | |
pacissate cond3 | apacissatha ; apacissiṃsu | apacissatha ; apacissiṃsu |
Text | Expected | Actual | |
---|---|---|---|
dakkhiti futu1 | dakkhāmi ; dakkhāma ; ; | dakkhāmi ; dakkhāma ; ; | |
dakkhiti futu2 | dakkhisi ; dakkhitha ; ; | dakkhisi ; dakkhitha ; ; | |
dakkhiti futu3 | dakkhiti ; dakkhinti ; ; | dakkhiti ; dakkhinti ; ; |
Text | Expected | Actual | |
---|---|---|---|
kāhati futu1 | kāhāmi ; kāhāma ; ; | kāhāmi ; kāhāma ; ; | |
kāhati futu2 | kāhisi ; ; ; | kāhisi ; ; ; | |
kāhati futu3 | kāhiti ; kāhinti ; ; | kāhiti ; kāhinti ; ; |
Text | Expected | Actual | |
---|---|---|---|
tanoti pres 1 | tanomi ; tanoma ; tanve ; tanumhe | tanomi ; tanoma ; tanve ; tanumhe | |
tanoti pres 2 | tanosi ; tanotha ; tanuse ; tanuvhe | tanosi ; tanotha ; tanuse ; tanuvhe | |
tanoti pres 3 | tanoti ; tanonti ; tanute ; tanunte tanure | tanoti ; tanonti ; tanute ; tanunte tanure | |
tanoti impf 1 | ; ; ; | ; ; ; | |
tanoti impf 2 | ; ; ; | ; ; ; | |
tanoti impf 3 | ; ; ; | ; ; ; | |
tanoti impr 1 | tanomi ; tanoma ; tanve ; tanvāmase | tanomi ; tanoma ; tanve ; tanvāmase | |
tanoti impr 2 | tanohi ; tanotha ; tanussu ; tanuvho | tanohi ; tanotha ; tanussu ; tanuvho | |
tanoti impr 3 | tanotu ; tanontu ; tanutaṃ ; tanuntaṃ | tanotu ; tanontu ; tanutaṃ ; tanuntaṃ | |
tanoti opt 1 | taneyyāmi taneyyaṃ ; taneyyāma ; taneyyaṃ ; taneyyāmhe | taneyyāmi taneyyaṃ ; taneyyāma ; taneyyaṃ ; taneyyāmhe | |
tanoti opt 2 | taneyyāsi ; taneyyātha ; tanetho ; taneyyavho | taneyyāsi ; taneyyātha ; tanetho ; taneyyavho | |
tanoti opt 3 | taneyya ; taneyyuṃ ; tanetha ; taneraṃ | taneyya ; taneyyuṃ ; tanetha ; taneraṃ | |
tanoti part | tanont ; | tanont ; | |
tanute pres 1 | tanve ; tanumhe | tanve ; tanumhe | |
tanute pres 2 | tanuse ; tanuvhe | tanuse ; tanuvhe | |
tanute pres 3 | tanute ; tanunte tanure | tanute ; tanunte tanure | |
tanute impf 1 | ; | ; | |
tanute impf 2 | ; | ; | |
tanute impf 3 | ; | ; | |
tanute impr 1 | tanve ; tanvāmase | tanve ; tanvāmase | |
tanute impr 2 | tanussu ; tanuvho | tanussu ; tanuvho | |
tanute impr 3 | tanutaṃ ; tanuntaṃ | tanutaṃ ; tanuntaṃ | |
tanute opt 1 | taneyyāmi taneyyaṃ ; taneyyāma ; taneyyaṃ ; taneyyāmhe | taneyyāmi taneyyaṃ ; taneyyāma ; taneyyaṃ ; taneyyāmhe | |
tanute opt 2 | taneyyāsi ; taneyyātha ; tanetho ; taneyyavho | taneyyāsi ; taneyyātha ; tanetho ; taneyyavho | |
tanute opt 3 | taneyya ; taneyyuṃ ; tanetha ; taneraṃ | taneyya ; taneyyuṃ ; tanetha ; taneraṃ | |
tanute part |
local tests = require('Module:UnitTests')
local m_conj_verb = require('Module:pi-conj/verb')
local m_str_utils = require("Module:string utilities")
local to_script = require("Module:pi-Latn-translit").tr
local insert = table.insert
local match = m_str_utils.match
local u = m_str_utils.char
-- tests.sc="Lana"
tests.sc = "Latn"
tests.option = {impl="yes"}
local spaceJoin = function(vals)
output = ""
for i, v in ipairs(vals) do
if output == "" then
output = v
else
output = output.." "..v
end
end
return output
end
local empty6 = {{}, {}, {}, {}, {}, {}}
local num = {[1] = 1, [3] = 2, [5] = 3}
local comp_lists = function(vref, vgot, label, tablet1, tablet2)
local exp, got
if tablet2 then
exp = spaceJoin(vref[tablet1] or {})..' ; '..
spaceJoin(vref[tablet2] or {})
got = spaceJoin(vgot[tablet1] or {})..' ; '..
spaceJoin(vgot[tablet2] or {})
else
exp = spaceJoin(vref[tablet1] or {})
got = spaceJoin(vgot[tablet1] or {})
end
tests:equals(label, got, to_script(exp, tests.sc, tests.option))
end
local pass_through = function(x) return x end
local knockout = function(forms)
retval = {}
for _, v in pairs(forms) do
if not match(v, "[โเໂເ][มวມວ]["..u(0x0e3a)..u(0x0eba)..']') then
insert(retval, v)
end
end
return retval
end
local compare = function(vref, vgot, label, tablet1, tablet2)
local exp, got
local r1 = vref[tablet1] or empty6
local g1 = vgot[tablet1] or empty6
local r2, g2
if tablet2 then
r2 = vref[tablet2] or empty6
g2 = vgot[tablet2] or empty6
end
local f
if (tests.sc == "Thai" or tests.sc == "Laoo") and
tests.option.impl ~= "no" then
f = knockout
else
f = pass_through
end
for i = 1, 5, 2 do
if tablet2 then
exp = spaceJoin(r1[i])..' ; '..spaceJoin(r1[i+1])
..' ; '..spaceJoin(r2[i])..' ; '..spaceJoin(r2[i+1])
got = spaceJoin(f(g1[i]))..' ; '..spaceJoin(f(g1[i+1]))
..' ; '..spaceJoin(f(g2[i]))..' ; '..spaceJoin(f(g2[i+1]))
else
exp = spaceJoin(r1[i])..' ; '..spaceJoin(r1[i+1])
got = spaceJoin(f(g1[i]))..' ; '..spaceJoin(f(g1[i+1]))
end
tests:equals(label..num[i], got, to_script(exp, tests.sc, tests.option))
end
end
local pacati_ref = {
presa = {
{"pacāmi"}, {"pacāma"}, {"pacasi"}, {"pacatha"},
{"pacati"}, {"pacanti"}
},
presm = {
{"pace"}, {"pacāmhe"}, {"pacase"}, {"pacavhe"},
{"pacate"}, {"pacante", "pacare"}
},
impfa = {
{"apaca", "apacaṃ"}, {"apacamhā"},
{"apaco"}, {"apacattha"},
{"apaca", "apacā"}, {"apacu", "apacū"}
},
impfm = {
{"apaciṃ"}, {"apacāmhase", "apacamhase"},
{"apacase"}, {"apacavhaṃ"},
{"apacattha"}, {"apacatthuṃ"}
},
impra = {
{"pacāmi"}, {"pacāma"}, {"paca", "pacāhi"}, {"pacatha"},
{"pacatu"}, {"pacantu"}
},
imprm = {
{"pace"}, {"pacāmase"}, {"pacassu"}, {"pacavho"},
{"pacataṃ"}, {"pacantaṃ"}
},
optaa = {
{"paceyyāmi", "paceyyaṃ", "pace"}, {"paceyyāma"},
{"paceyyāsi", "pace"}, {"paceyyātha"},
{"paceyya", "pace"}, {"paceyyuṃ"}
},
optaa_irr = {
{"paceyyāmi", "paceyyaṃ"}, {"paceyyāma"},
{"paceyyāsi"}, {"paceyyātha"},
{"paceyya"}, {"paceyyuṃ"}
},
optam = {
{"paceyyaṃ"}, {"paceyyāmhe"}, {"pacetho"}, {"paceyyavho"},
{"pacetha"}, {"paceraṃ"}
},
pap = {"pacant"},
pmp = {"pacamāna"},
}
local corayati_ref = {
presa = {
{"corayāmi"}, {"corayāma"}, {"corayasi"}, {"corayatha"},
{"corayati"}, {"corayanti"}
},
presm = {
{"coraye"}, {"corayāmhe"}, {"corayase"}, {"corayavhe"},
{"corayate"}, {"corayante", "corayare"}
},
impfa = {
{"coraya", "corayaṃ"}, {"corayamhā"},
{"corayo"}, {"corayattha"},
{"coraya", "corayā"}, {"corayu", "corayū"}
},
impfm = {
{"corayiṃ"}, {"corayāmhase", "corayamhase"},
{"corayase"}, {"corayavhaṃ"},
{"corayattha"}, {"corayatthuṃ"}
},
impra = {
{"corayāmi"}, {"corayāma"}, {"corayāhi"}, {"corayatha"},
{"corayatu"}, {"corayantu"}
},
imprm = {
{"coraye"}, {"corayāmase"}, {"corayassu"}, {"corayavho"},
{}, {"corayantaṃ"} -- 3s deleted pending review!
},
optaa = {
{"corayeyyāmi", "corayeyyaṃ"}, {"corayeyyāma"}, --aye 1s & 2s needs
{"corayeyyāsi"}, {"corayeyyātha"}, -- attestation.
{"corayeyya", "coraye"}, {"corayeyyuṃ"}
},
optam = {
{"corayeyyaṃ"}, {"corayeyyāmhe"}, {"corayetho"}, {"corayeyyavho"},
{"corayetha"}, {"corayeraṃ"}
},
pap = {"corayant"},
pmp = {"corayamāna"},
}
local coreti_ref = {
presa = {
{"coremi"}, {"corema"}, {"coresi"}, {"coretha"},
{"coreti"}, {"corenti"}
},
impra = {
{"coremi"}, {"corema"}, {"corehi"}, {"coretha"},
{"coretu"}, {"corentu"}
},
optaa = {
{"coreyyāmi", "coreyyaṃ"}, {"coreyyāma"}, --aye 1s & 2s needs
{"coreyyāsi"}, {"coreyyātha"}, -- attestation.
{"coreyya"}, {"coreyyuṃ"}
},
optam = {
{"coreyyaṃ"}, {"coreyyāmhe"}, {"coretho"}, {"coreyyavho"},
{"coretha"}, {"coreraṃ"}
},
pap = {"corent"},
}
local corete_ref = {
presm = {
{"coraye"}, {"corayāmhe"}, {"corayase"}, {"corayavhe"},
{"corayate"}, {"corayante", "corayare"}
},
imprm = {
{"coraye"}, {"corayāmase"}, {"corayassu"}, {"corayavho"},
{}, {"corayantaṃ"} -- 3s deleted pending review!
},
optaa = coreti_ref.optaa,
optam = coreti_ref.optam,
pmp = {"corayamāna"},
}
local tanoti_ref = { -- Middle forms
presa = {
{"tanomi"}, {"tanoma"}, {"tanosi"}, {"tanotha"},
{"tanoti"}, {"tanonti"}
},
presm = {
{"tanve"}, {"tanumhe"}, {"tanuse"}, {"tanuvhe"},
{"tanute"}, {"tanunte", "tanure"}
},
impra = {
{"tanomi"}, {"tanoma"}, {"tanohi"}, {"tanotha"},
{"tanotu"}, {"tanontu"}
},
imprm = {
{"tanve"}, {"tanvāmase"}, {"tanussu"}, {"tanuvho"},
{"tanutaṃ"}, {"tanuntaṃ"}
},
optaa = {
{"taneyyāmi", "taneyyaṃ"}, {"taneyyāma"},
{"taneyyāsi"}, {"taneyyātha"},
{"taneyya"}, {"taneyyuṃ"}
},
optam = {
{"taneyyaṃ"}, {"taneyyāmhe"}, {"tanetho"}, {"taneyyavho"},
{"tanetha"}, {"taneraṃ"}
},
pap = {"tanont"},
}
local dadati_ref = {
presa = {
{"dadāmi"}, {"dadāma"}, {"dadāsi"}, {"dadātha"},
{"dadāti"}, {"dadanti"}
},
presm = {
{"dade"}, {"dadāmhe"}, {"dadāse"}, {"dadavhe"},
{"dadāte"}, {"dadante", "dadāre"}
},
impfa = {
{"adada", "adadaṃ"}, {"adadamhā"},
{"adado"}, {"adadattha"},
{"adada", "adadā"}, {"adadu", "adadū"}
},
impfm_disabled = {
{"adadiṃ"}, {"adadāmhase", "adadamhase"},
{"adadase"}, {"adadavhaṃ"},
{"adadattha"}, {"adadatthuṃ"}
},
impra = {
{"dadāmi"}, {"dadāma"}, {"dadā", "dadāhi"}, {"dadātha"},
{"dadātu"}, {"dadantu"}
},
optaa = {
{"dadeyyāmi", "dadeyyaṃ"}, {"dadeyyāma"}, -- "dade" is exceptional.
{"dadeyyāsi"}, {"dadeyyātha"}, -- "dade" is exceptional.
{"dadeyya", "dade"}, {"dadeyyuṃ"}
},
optam = {
{"dadeyyaṃ"}, {"dadeyyāmhe"}, {"dadetho"}, {"dadeyyavho"},
{"dadetha"}, {"daderaṃ"}
},
pap = {"dadant"},
pmp = {"dadamāna"},
}
local dajja_ref = {
optaa = {
{"dajjāmi"}, {"dajjāma"}, {"dajjāsi"}, {"dajjātha"},
{"dajjā"}, {"dajjuṃ"}},
}
local pacissati_ref = {
futua = {
{"pacissāmi"}, {"pacissāma"}, {"pacissasi"}, {"pacissatha"},
{"pacissati"}, {"pacissanti"},
},
futum = {
{"pacissaṃ"}, {"pacissāmhe"}, {"pacissase"}, {"pacissavhe"},
{"pacissate"}, {"pacissante"},
},
conda = {
{"apacissaṃ"}, {}, {"apacissa", "apacissi"}, {"apacissatha"},
{"apacissā", "apacissa"}, {"apacissaṃsu"},
},
condm = {
{"apacissaṃ"}, {"apacissāmhase"},
{"apacisse", "apacissase"}, {"apacissavhe"},
{"apacissatha"}, {"apacissiṃsu"},
},
fap = {"pacissant"},
}
gamissati_ref = {
conda = { {"agamissaṃ"}, {}, {"agamissa", "agamissi"}, {"agamissatha"},
{"agamissā", "agamissa"}, {"agamissaṃsu"},
},
condm = {
{"agamissaṃ"}, {"agamissāmhase"},
{"agamisse", "agamissase"}, {"agamissavhe"},
{"agamissatha"}, {"agamissiṃsu"},
},
}
dakkhiti_ref = {
futua = {{"dakkhāmi"}, {"dakkhāma"}, {"dakkhisi"}, {"dakkhitha"}, {"dakkhiti"}, {"dakkhinti"}}
}
heti_ref = {
futua = {{"hemi"}, {"hema"}, {"hesi"}, {"hetha"}, {"heti"}, {"henti"}}
}
kahiti_ref = {
futua = {{"kāhāmi"}, {"kāhāma"}, {"kāhisi"}, {}, {"kāhiti"}, {"kāhinti"}}
}
-- function tests:test_basic_tables()
function tests:test_ati()
local impl = tests.option.impl or "yes"
local pacati = to_script("pacati", tests.sc, tests.option)
local pacati_got = m_conj_verb.special_forms(pacati,
{augment="with_made", impf_voice="both", impl = impl})
compare(pacati_ref, pacati_got, "pacati pres ", "presa", "presm")
compare(pacati_ref, pacati_got, "pacati impf ", "impfa", "impfm")
compare(pacati_ref, pacati_got, "pacati impr ", "impra", "imprm")
compare(pacati_ref, pacati_got, "pacati opt ", "optaa", "optam")
comp_lists(pacati_ref, pacati_got, "pacati part ", "pap", "pmp")
local pacate = to_script("pacate", tests.sc, tests.option)
local pacate_got = m_conj_verb.special_forms(pacate,
{ augment="with_made", impf_voice="both", opta_voice = "both",
impl = impl })
compare(pacati_ref, pacate_got, "pacate pres ", "presm")
compare(pacati_ref, pacate_got, "pacate impf ", "impfm")
compare(pacati_ref, pacate_got, "pacate impr ", "imprm")
compare(pacati_ref, pacate_got, "pacate opt ", "optaa", "optam")
comp_lists(pacati_ref, pacate_got, "pacate part ", "pmp")
local namati = to_script("namati", tests.sc, tests.option)
local apaca = to_script("apaca", tests.sc, tests.option)
local apaca_got = m_conj_verb.special_forms(namati,
{ impf_voice="both", impf=apaca, impf2=apaca, augment="with_given",
impl = impl })
compare(pacati_ref, apaca_got, "apaca impf ", "impfa", "impfm")
local namate = to_script("namate", tests.sc, tests.option)
local nama = to_script("nama", tests.sc, tests.option)
local apacattha = to_script("apacattha", tests.sc, tests.option)
local apacattha_got = m_conj_verb.special_forms(namati,
{midl=namate, impf_voice="midl", impl = impl,
impf=nama, impf_midl=apacattha, augment="with_given"})
compare(pacati_ref, apacattha_got, "apacattha impf m", "impfm")
-- if nil then -- Unusability is a deliberate, documented feature, not a bug.
-- local pace = to_script("pace", tests.sc, tests.option)
-- local pace_got = m_conj_verb.special_forms("namati", {
-- opta_mod="replace", opta=pace})
-- compare(pacati_ref, pace_got, "pace opt ", "optaa", "optam")
-- end
local paceyya = to_script("paceyya", tests.sc, tests.option)
local paceyya_got = m_conj_verb.special_forms(namati, {
opta_mod="replace", opta=paceyya, impl = impl})
local paceyya_ref = { optaa = pacati_ref.optaa_irr,
optam = pacati_ref.optam }
compare(paceyya_ref, paceyya_got, "paceyya opt ", "optaa", "optam")
local pacetha = to_script("pacetha", tests.sc, tests.option)
local pacetha_got = m_conj_verb.special_forms(namati, {
opta_midl=pacetha, impl = impl})
if nil then -- This is useful as a selectional test.
compare(pacati_ref, pacetha_got, "pacetha opt ", "optaa", "optam")
end
compare(pacati_ref, pacetha_got, "pacetha opt m", "optam")
end
-- Stems in -ayati have differences from -ati that aren't captured by -eti.
function tests:test_ayati()
local impl = tests.option.impl or "yes"
local corayati = to_script("corayati", tests.sc, tests.option)
local corayati_got = m_conj_verb.special_forms(corayati,
{impf_voice="both", augment="without", impl = impl})
compare(corayati_ref, corayati_got, "corayati pres ", "presa", "presm")
compare(corayati_ref, corayati_got, "corayati impf ", "impfa", "impfm")
compare(corayati_ref, corayati_got, "corayati impr ", "impra", "imprm")
compare(corayati_ref, corayati_got, "corayati opt ", "optaa", "optam")
comp_lists(corayati_ref, corayati_got, "corayati part ", "pap", "pmp")
corayate = to_script("corayate", tests.sc, tests.option)
local corayate_got = m_conj_verb.special_forms(corayate,
{impf_voice="both", augment="without", opta_voice = "both", impl = impl})
compare(corayati_ref, corayate_got, "corayate pres ", "presm")
compare(corayati_ref, corayate_got, "corayate impf ", "impfm")
compare(corayati_ref, corayate_got, "corayate impr ", "imprm")
compare(corayati_ref, corayate_got, "corayate opt ", "optaa", "optam")
comp_lists(corayati_ref, corayate_got, "corayate part ", "pmp")
namati = to_script("namati", tests.sc, tests.option)
coraya = to_script("coraya", tests.sc, tests.option)
local coraya_got = m_conj_verb.special_forms(namati,
{impf_voice="both", impf=coraya, augment="with_given", impl = impl})
compare(corayati_ref, coraya_got, "coraya impf ", "impfa", "impfm")
nama = to_script("nama", tests.sc, tests.option)
namate = to_script("namate", tests.sc, tests.option)
corayattha = to_script("corayattha", tests.sc, tests.option)
local corayattha_got = m_conj_verb.special_forms(namati,
{midl=namate, impf_voice="midl",
impf=nama, impf_midl=corayattha, augment="with_given"})
compare(corayati_ref, corayattha_got, "corayattha impf m", "impfm")
end
function tests:test_eti()
local impl = tests.option.impl or "yes"
local coreti = to_script("coreti", tests.sc, tests.option)
local coreti_got = m_conj_verb.special_forms(coreti,
{augment="without", impf_voice="both", impl = impl})
compare(coreti_ref, coreti_got, "coreti pres ", "presa", "presm")
compare(coreti_ref, coreti_got, "coreti impf ", "impfa", "impfm")
compare(coreti_ref, coreti_got, "coreti impr ", "impra", "imprm")
compare(coreti_ref, coreti_got, "coreti opt ", "optaa", "optam")
comp_lists(coreti_ref, coreti_got, "coreti part ", "pap", "pmp")
local corete = to_script("corete", tests.sc, tests.option)
local corete_got = m_conj_verb.special_forms(corete,
{ augment="without", impf_voice="both", opta_voice="both",
impl=impl })
compare(corete_ref, corete_got, "corete pres ", "presm")
compare(corete_ref, corete_got, "corete impf ", "impfm")
compare(corete_ref, corete_got, "corete impr ", "imprm")
compare(corete_ref, corete_got, "corete opt ", "optaa", "optam")
comp_lists(corete_ref, corete_got, "corete part ", "pmp")
end
function tests:test_oti()
local impl = tests.option.impl or "yes"
local tanoti = to_script("tanoti", tests.sc, tests.option)
local tanoti_got = m_conj_verb.special_forms(tanoti,
{augment="without", impf_voice="both", impl=impl})
compare(tanoti_ref, tanoti_got, "tanoti pres ", "presa", "presm")
compare(tanoti_ref, tanoti_got, "tanoti impf ", "impfa", "impfm")
compare(tanoti_ref, tanoti_got, "tanoti impr ", "impra", "imprm")
compare(tanoti_ref, tanoti_got, "tanoti opt ", "optaa", "optam")
comp_lists(tanoti_ref, tanoti_got, "tanoti part ", "pap", "pmp")
local tanute = to_script("tanute", tests.sc, tests.option)
local tanute_got = m_conj_verb.special_forms(tanute,
{ augment="without", impf_voice="both", opta_voice = "both",
impl=impl })
compare(tanoti_ref, tanute_got, "tanute pres ", "presm")
compare(tanoti_ref, tanute_got, "tanute impf ", "impfm")
compare(tanoti_ref, tanute_got, "tanute impr ", "imprm")
compare(tanoti_ref, tanute_got, "tanute opt ", "optaa", "optam")
comp_lists(tanoti_ref, tanute_got, "tanute part ", "pmp")
end
function tests:test_aati()
local impl = tests.option.impl or "yes"
local dadati = to_script("dadāti", tests.sc, tests.option)
local dadati_got = m_conj_verb.special_forms(dadati,
{augment="with_made", impf_voice="both", impl=impl})
compare(dadati_ref, dadati_got, "dadāti pres ", "presa", "presm")
compare(dadati_ref, dadati_got, "dadāti impf ", "impfa", "impfm")
compare(dadati_ref, dadati_got, "dadāti impr ", "impra", "imprm")
compare(dadati_ref, dadati_got, "dadāti opt ", "optaa", "optam")
comp_lists(dadati_ref, dadati_got, "dadāti part ", "pap", "pmp")
local dadate = to_script("dadāte", tests.sc, tests.option)
local dadate_got = m_conj_verb.special_forms(dadate,
{ augment="without", impf_voice="both", opta_voice="both",
impl = impl })
compare(dadati_ref, dadate_got, "dadāte pres ", "presm")
compare(dadati_ref, dadate_got, "dadāte impf ", "impfm")
compare(dadati_ref, dadate_got, "dadāte impr ", "imprm")
compare(dadati_ref, dadate_got, "dadāte opt ", "optaa", "optam")
comp_lists(dadati_ref, dadate_got, "dadāte part ", "pmp")
local dajja = to_script("dajjā", tests.sc, tests.option)
local dajja_got = m_conj_verb.special_forms(dadati,
{ voice="none", opta_voice="act", opta_mod="replace", opta=dajja,
impl=impl})
compare(dajja_ref, dajja_got, "dadāti alt opt a", "optaa")
end
function tests:test_issati()
local impl = tests.option.impl or "yes"
local pacissati = to_script("pacissati", tests.sc, tests.option)
local pacissate = to_script("pacissate", tests.sc, tests.option)
local pacissati_got = m_conj_verb.future_forms(pacissati,
{voice = "none", futu=pacissati, futu_voice = "both", cond_voice = "both",
impl = impl, cond_augment = "with_made"}, true)
compare(pacissati_ref, pacissati_got, "pacissati fut", "futua", "futum")
compare(pacissati_ref, pacissati_got, "pacissati cond", "conda", "condm")
-- comp_lists(dadati_ref, dadate_got, "pacissati part", "fap", "fmp")
local pacissate_got = m_conj_verb.future_forms(pacissate,
{voice = "none", futu=pacissate, cond_voice = "midl",
impl = impl, cond_augment = "with_made"}, true)
compare(pacissati_ref, pacissate_got, "pacissate fut", "futum")
compare(pacissati_ref, pacissate_got, "pacissate cond", "condm")
end
function tests:test_issa()
local impl = tests.option.impl or "yes"
local agamissa = to_script("agamissa", tests.sc, tests.option)
local agamissaa = to_script("agamissā", tests.sc, tests.option)
local agamissatha = to_script("agamissatha", tests.sc, tests.option)
local pacissati = to_script("pacissati", tests.sc, tests.option)
local pacissate = to_script("pacissate", tests.sc, tests.option)
local agamissa_got = m_conj_verb.future_forms(pacissati,
{cond=agamissa, futu=pacissati, impl = impl, cond_augment="with_given"}, true)
compare(gamissati_ref, agamissa_got, "agamissa cond", "conda", "condm")
local agamissaa_got = m_conj_verb.future_forms(pacissati,
{cond=agamissaa, futu=pacissati, impl = impl, cond_augment="with_given"}, true)
compare(gamissati_ref, agamissaa_got, "agamissā cond", "conda", "condm")
local agamissatha_got = m_conj_verb.future_forms(pacissate,
{cond=agamissatha, futu=pacissate, impl = impl, cond_augment="with_given"}, true)
compare(gamissati_ref, agamissatha_got, "agamissatha cond", "condm")
end
function tests:test_iti()
local impl = tests.option.impl or "yes"
local dakkhiti = to_script("dakkhiti", tests.sc, tests.option)
local dakkhiti_got = m_conj_verb.future_forms(dakkhiti, {futu=dakkhiti, impl=impl}, true)
compare(dakkhiti_ref, dakkhiti_got, "dakkhiti futu", "futua", "futum")
end
function tests:test_heti()
local impl = tests.option.impl or "yes"
local heti = to_script("heti", tests.sc, tests.option)
local heti_got = m_conj_verb.future_forms(heti, {futu=heti, impl=impl}, true)
compare(heti_ref, heti_got, "heti futu", "futua", "futum")
end
function tests:test_kahiti()
local impl = tests.option.impl or "yes"
local kahiti = to_script("kāhiti", tests.sc, tests.option)
local kahiti_got = m_conj_verb.future_forms(kahiti, {futu=kahiti, impl=impl}, true)
compare(kahiti_ref, kahiti_got, "kāhati futu", "futua", "futum")
end
return tests