Editing Module:Template test case

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. Read the Privacy Policy to learn what information we collect about you and how we use it.

If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 758: Line 758:


-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Bridge functions
-- Exports
--
-- These functions translate template arguments into forms that can be accepted
-- by the different classes, and return the results.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------


local bridge = {}
local p = {}


function bridge.table(args, cfg)
function p.table(args, cfg)
cfg = cfg or mw.loadData(DATA_MODULE)
cfg = cfg or mw.loadData(DATA_MODULE)


Line 795: Line 792:
end
end


function bridge.nowiki(args, cfg)
function p.nowiki(args, cfg)
cfg = cfg or mw.loadData(DATA_MODULE)
cfg = cfg or mw.loadData(DATA_MODULE)


Line 807: Line 804:
return tostring(testCaseObj)
return tostring(testCaseObj)
end
end
-------------------------------------------------------------------------------
-- Exports
-------------------------------------------------------------------------------
local p = {}


function p.main(frame, cfg)
function p.main(frame, cfg)
Line 847: Line 838:
end
end


return bridge[func](args, cfg)
return p[func](args, cfg)
end
end


Please note that all contributions to Nonbinary Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Nonbinary Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page: