Lua error in Module:User:Jberkel/usex at line 119: assign to undeclared variable 'wrap'
local ScribuntoUnit = require('Module:ScribuntoUnit')
local m_usex_templates = require('Module:User:Jberkel/usex/templates')
local suite = ScribuntoUnit:new()
function usex_t(args)
local frame = mw.getCurrentFrame():newChild{ title = 'test', args = args }
return m_usex_templates.usex_t(frame:newChild{})
end
function usex_t_quote(args)
local frame = mw.getCurrentFrame():newChild{ title = 'test', args = args }
return m_usex_templates.usex_t(frame:newChild{ args = { quote = '1' } })
end
function suite:test_usex_t_example()
local result = usex_t { 'fr', 'Ceci est un exemple', 'This is an example' }
suite:assertEquals('<div class="h-usage-example"><i class="Latn mention e-example" lang="fr">Ceci est un exemple</i>‎ <dl><dd><span class="e-translation">This is an example</span></dd></dl></div>', result)
end
function suite:test_usex_t_quote()
local result = usex_t_quote { 'fr', 'Ceci est un quote', 'This is a quotation' }
suite:assertEquals('<div class="h-quotation"><span class="Latn e-quotation" lang="fr">Ceci est un quote</span>‎ <dl><dd><span class="e-translation">This is a quotation</span></dd></dl></div>', result)
end
return suite