Module:Template test case: Difference between revisions

allow _template to override _template1 for backwards compatibility with Module:Testcase table
(oops, forgot to change the return value)
(allow _template to override _template1 for backwards compatibility with Module:Testcase table)
Line 177:
end
 
-- AddSet defaultup first two template options tables, so that if only the
-- "template3" is specified it isn't made the first template when the
-- the table options array is compressed.
rawTemplateOptions[1] = rawTemplateOptions[1] or {}
rawTemplateOptions[2] = rawTemplateOptions[2] or {}
 
-- Allow the "template" option to override the "template1" option for
-- backwards compatibility with [[Module:Testcase table]].
rawTemplateOptions[1].template = generalOptions.template
or rawTemplateOptions[1].template
 
-- Add default template options
if rawTemplateOptions[1].template and not rawTemplateOptions[2].template then
rawTemplateOptions[2].template = rawTemplateOptions[1].template ..