Toggle menu
15
236
75
27.7K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Template test case/doc: Difference between revisions

From Kenshi Wiki
Created page with "{{Lua|Module:Template test case/data|Module:Template invocation|Module:Protect|Module:Arguments|Module:Yesno}} This module provides a framework for making templates which produce a template test case. While test cases can be made manually, using Lua-based templates such as the ones provided by this module has the advantage that the template arguments only need to be input once, thus reducing the effort involved in making test cases and reducing the possi..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{doc sub}}
{{Lua|Module:Template test case/data|Module:Template invocation|Module:Protect|Module:Arguments|Module:Yesno}}
{{Lua|Module:Template test case/data|Module:Template invocation|Module:Protect|Module:Arguments|Module:Yesno}}
This module provides a framework for making templates which produce a [[WP:TESTCASES|template test case]]. While test cases can be made manually, using Lua-based templates such as the ones provided by this module has the advantage that the template arguments only need to be input once, thus reducing the effort involved in making test cases and reducing the possibility of errors in the input.
This module provides a framework for making templates which produce a [[WP:TESTCASES|template test case]]. While test cases can be made manually, using Lua-based templates such as the ones provided by this module has the advantage that the template arguments only need to be input once, thus reducing the effort involved in making test cases and reducing the possibility of errors in the input.
Line 32: Line 33:
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here and interwikis go in Wikidata. -->
<!-- Categories go here and interwikis go in Wikidata. -->
[[Category:Modules]]
[[Category:Modules that add a tracking category]]
[[Category:Modules that add a tracking category]]
[[Category:Modules that check for strip markers]]
[[Category:Modules that check for strip markers]]
}}</includeonly>
}}</includeonly><noinclude>
[[Category:Module documents]]
</noinclude>

Latest revision as of 01:09, 10 March 2025

This module provides a framework for making templates which produce a template test case. While test cases can be made manually, using Lua-based templates such as the ones provided by this module has the advantage that the template arguments only need to be input once, thus reducing the effort involved in making test cases and reducing the possibility of errors in the input.

Usage

This module should not usually be called directly. Instead, you should use one of the following templates:

Parameter-based templates:

The only difference between these templates is their default arguments. For example, it is possible to display test cases side by side in Template:Testcase rows by specifying |_format=columns

Nowiki-based templates:

It is also possible to use a format of {{#invoke:template test case|main|parameters}}. This uses the same defaults as Template:Test case; please see that page for documentation of the parameters.

There is no direct interface to this module for other Lua modules. Lua modules should generally use Lua-based test case modules such as Module:UnitTests or Module:ScribuntoUnit. If it is really necessary to use this module, you can use frame:expandTemplate with one of the templates listed above.

Configuration

This module has a configuration module at Module:Template test case/config. You can edit it to add new wrapper templates, or to change the messages that the module outputs.

Tracking categories