Module:Interlinear/testcases

local p = require('Module:UnitTests')

function p:test_defaults local base = 'Nginda-rni ngaja-mi jurliji-rdarra diyim ka-rdu

DEM(M)-FOC see-IRR bird-PL fly 3SG-go

\'Look at all the birds flying!\'' local explicit = 'Nginda-rni ngaja-mi jurliji-rdarra diyim ka-rdu

DEM(M)-FOC see-IRR bird-PL fly 3SG-go

\'Look at all the birds flying!\'' self:preprocess_equals_preprocess(base, explicit, {nowiki=1}) end

function p:test_italics local base = '{Line 1}

{Line 2}

Line 3' self:preprocess_equals_preprocess(base, '{Line 1}

{Line 2}

Line 3', {nowiki=1})		self:preprocess_equals_preprocess(base, '{Line 1}

{Line 2}

Line 3', {nowiki=1})		self:preprocess_equals_preprocess(base, '{Line 1}

{Line 2}

Line 3', {nowiki=1})	end function p:test_glossing	local base = '{Line 1}

{Line 2}

Line 3' self:preprocess_equals_preprocess(base, '{Line 1}

{Line 2}

Line 3', {nowiki=1})		self:preprocess_equals_preprocess(base, '{Line 1}

{Line 2}

Line 3', {nowiki=1})		self:preprocess_equals_preprocess(base, '{Line 1}

{Line 2}

Line 3', {nowiki=1})	end

function p:test_find_gloss self:preprocess_equals('test+test', ' test+test ', {nowiki=1}) self:preprocess_equals('test+PRES', ' test+PRES ', {nowiki=1}) self:preprocess_equals('test.test', ' test.test ', {nowiki=1}) self:preprocess_equals('test.PRES', ' test.PRES ', {nowiki=1}) self:preprocess_equals('test.PRES', ' test.PRES \127\'"`UNIQ--ref-00000000-QINU`"\'\127 ', {nowiki=1}) end return p