Jump to content

Module:Template test case

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 06:10, 21 November 2014 (first draft of the spec for a generalised template test cases module). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

-- This module provides several methods to generate test cases.

--------------------------------------------------------------------------------
-- Test case display functions
--
-- Test case display functions produce the wikitext to display the template
-- output for one test case. For example, one function might produce templates
-- aligned horizontally, and another function might produce templates aligned
-- one below the other.
--
-- They are named functions that accept the following parameters:
-- * templates - an array of subtables containing data about each template to be
--     displayed. These subtables can contain the following values:
--     * result - the expanded wikitext from the template.
--     * invocation - the original unexpanded wikitext that the output was
--         generated from. This may be nil if the invocation is not available.
--     * name - the name of the template.
--     * link - a normal wikilink to the template page (displays as
--         "Template:Foo").
--     * braceLink - a wikilink to the template page formatted like the {{tl}}
--         template, i.e. it displays as "{{Foo}}".
--     * heading - a heading to display above the template output.
--------------------------------------------------------------------------------