Module:Template test case/doc
Bul Module:Template test case moduline arnalǵan hújjet beti
Bul úlgi tómendegi Luadan paydalanadı: |
Bul modul shablon testquti óndiriwshi shablonlardı jaratıw ushın tiykar jaratadı. Test jaǵdayların qolda qılıw múmkin bolsa da, bul modul tárepinen usınıs etilgenler sıyaqlı Lua-ǵa tiykarlanǵan shablonlardan paydalanıwdıń abzallıǵı sonda, shablon argumentlari tek bir ret kiritiliwi kerek, sol sebepli test jaǵdayların jaratıwda sarplanatuǵın háreketlerdi azaytadı hám qáteler kirgiziw múmkinshiligın azaytadı.
Usage
redaktorlawThis module should not usually be called directly. Instead, you should use one of the following templates:
Parameter-based templates:
- Template:Test case – for standard test cases
- Template:Testcase table – for test cases arranged side by side in columns
- Template:Testcase rows – for test cases arranged as rows in a table
- Template:Collapsible test case – for test cases that are collapsed by default if the results are the same
- Template:Inline test case – for test cases with small invocations and small output, that do not contain any line breaks
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:
- Template:Test case nowiki – for test cases created from template code wrapped in nowiki tags (useful for displaying complex template invocations)
- Template:Nowiki template demo – for use in template documentation
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
redaktorlawThis 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
redaktorlaw