Module:Template test case/config

From David's Wiki
Revision as of 19:19, 16 September 2019 by David (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
\( \newcommand{\P}[]{\unicode{xB6}} \newcommand{\AA}[]{\unicode{x212B}} \newcommand{\empty}[]{\emptyset} \newcommand{\O}[]{\emptyset} \newcommand{\Alpha}[]{Α} \newcommand{\Beta}[]{Β} \newcommand{\Epsilon}[]{Ε} \newcommand{\Iota}[]{Ι} \newcommand{\Kappa}[]{Κ} \newcommand{\Rho}[]{Ρ} \newcommand{\Tau}[]{Τ} \newcommand{\Zeta}[]{Ζ} \newcommand{\Mu}[]{\unicode{x039C}} \newcommand{\Chi}[]{Χ} \newcommand{\Eta}[]{\unicode{x0397}} \newcommand{\Nu}[]{\unicode{x039D}} \newcommand{\Omicron}[]{\unicode{x039F}} \DeclareMathOperator{\sgn}{sgn} \def\oiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x222F}\,}{\unicode{x222F}}{\unicode{x222F}}{\unicode{x222F}}}\,}\nolimits} \def\oiiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x2230}\,}{\unicode{x2230}}{\unicode{x2230}}{\unicode{x2230}}}\,}\nolimits} \)

Documentation for this module may be created at Module:Template test case/config/doc

-------------------------------------------------------------------------------
--                    Module:Template test case/config
-- This module holds configuration data for [[Module:Template test case]].
-------------------------------------------------------------------------------

return {

-------------------------------------------------------------------------------
-- Options
-------------------------------------------------------------------------------

-- The magic word used in place of the template name when making nowiki
-- invocations.
templateNameMagicWord = '__TEMPLATENAME__',

-- The subpage that sandboxes are typically stored on. Used when loading
-- wrapper template config and when guessing the sandbox template name.
sandboxSubpage = 'sandbox',

-------------------------------------------------------------------------------
-- Messages
-------------------------------------------------------------------------------

msg = {

-- The default header for test cases rendered in columns.
['columns-header'] = 'Side by side comparison',

-- The error message to use if a templaten option is missing.
-- $1 - the number of the missing template option.
['missing-template-option-error'] = "one or more options ending in '$1' " ..
	"were detected, but no 'template$1' option was found",

-- The error message to use if a nowiki invocation is used but the template
-- name magic word is not found.
-- $1 - the value of the template name magic word
['nowiki-magic-word-error'] = "the template invocation must include '$1' in " ..
	"place of the template name",

},

-------------------------------------------------------------------------------
-- Wrapper template config.
-- The wrapper template config is a table with wrapper template names as keys,
-- and subtables containing two fields:
--   func - the function name to be used with that template. This must be a
--       function exported by the main module. This is optional: the default
--       value is "table".
--   args - a table of default arguments to be used with that template. This is
--       is optional.
-------------------------------------------------------------------------------

wrappers = {
	['Template:Test case'] = {},
	['Template:Testcase table'] = {
		args = {_format = 'columns'}
	},
	['Template:Testcase rows'] = {
		args = {_format = 'rows'}
	},
	['Template:Test case nowiki'] = {
		func = 'nowiki'
	},
	['Template:Nowiki template demo'] = {
		func = 'nowiki',
		args = {showheader = false, showtemplate2 = false}
	},
	['Template:Collapsible test case'] = {
		args = {_collapsible = true}
	},
	['Template:Collapsible 2 test case'] = {
		args = {_collapsible = true, _wantdiff = true}
	},
	['Template:Inline test case'] = {
		args = {_format = 'inline', _showcode = true}
	},
},

-------------------------------------------------------------------------------
-- End config
-------------------------------------------------------------------------------

}