Module:Params/testcases explained

This is the testcases page for checking the behaviour of .

As the module provides most of its functionalities only when called by templates, this page uses helper subtemplates to do its tests. You can find a complete list of these here. Several helper subtemplates come in two versions, one that depends on and one that depends on . Example templates, used by the documentation page, are available at /doc/examples.

General tests

Multi-purpose helper subtemplates

Helper subtemplate

The subtemplate allows to simulate in one single call both the incoming parameters and the parameters manually concatenated to {{ml|params|...|''function''|...}}, using a single hyphen (-) as a delimiter between the two groups. This allows to make general experiments directly from the preview window without having to edit separate templates.

For instance, writing

will simulate a call with,, and to a template whose content is , thus producing:

An identical subtemplate that uses instead of is available at .

Single-purpose helper subtemplates

Helper subtemplate

The subtemplate allows to test the behaviour of delimiter strings between the arguments it was called with, invoking several functions of the module at once. For instance,

generates

An identical subtemplate that uses instead of is available at .

Helper subtemplate

The subtemplate allows to test the behaviour of functions that focus on numerical and sequential arguments. As these require at most two arguments, the template uses the and special parameters to do its tests. For instance,

generates

An identical subtemplate that uses instead of is available at .

Helper subtemplate

The subtemplate allows to test the behaviour of all the mapping_* and renaming_* class of modifiers. As the template generates a very large page its expansion is not shown here. For more information please visit its documentation page.

An identical subtemplate that uses instead of is available at .

Helper subtemplate

The subtemplate compares the behaviours of with that of . For instance,

generates

Testing individual functions

Testing the [[Module:Params#list|list]] function

Helper subtemplate

The subtemplate calls the function to echo the code it was called with.

Example:

Dummies

See also