# வார்ப்புரு:Testcase table/doc



This template generates a table of side-by-side testcases comparing two or more templates. Each template is called with the same parameters.  

All parameters passed to this template are passed through to the test-case templates, with the exception of parameters starting with an underscore character ("_"), which are reserved for internal use.  

If no templates are specified explicitly, the module uses the base page of the current page as the first template, and its /sandbox subpage as the second template. If only one template is specified explicitly, its /sandbox subpage is used as the second template.  

## Usage

**Basic syntax**  
<pre>  

</pre>  

**Full syntax**  
<pre>  

</pre>  

## Parameters

| <code>_template1</code>
<code>_template2</code>
*(etc)* | Names of the templates to be processed. <code>_template1</code>'s default is the current page's . If <code>_template1</code> is specified, the default for <code>_template2</code> is its /sandbox ; if not, the default for <code>_template2</code> is the /sandbox subpage of the current page's basepage. Template names should be entered as you would use them in a normal template invocation, i.e. "3x", not "Template:3x". If you need to test a page in the main namespace you can use a colon prefix, i.e. ":*article name*". |  |
| --- | --- | --- |
| <code>_template</code> | Alias for <code>_template1</code>. If both <code>_template</code> and <code>_template1</code> are specified, <code>_template</code> will take precedence. |  |
| <code>_showtemplate1</code>, <code>_showtemplate2</code>, <code>_showtemplate3</code>... | If this is set to "no", then no output is shown for that template. This is useful if you only want to show the main template, or if you only want to show the sandbox template. |  |
| <code>_heading1</code>
<code>_heading2</code>
*(etc)* | Custom headings for each of the templates. |  |
| <code>_showheader</code> | If this is set to "no", then no headers are shown. |  |
| <code>_class</code> | HTML classes for the table. Use to format the table as a wikitable. |  |
| <code>_style</code> | Custom inline CSS for the table. |  |
| <code>_caption</code> | Custom caption for the table. The default is "Side by side comparison". |  |
| <code>_rowheader</code> | An extra heading for the row containing the templates. |  |
| <code>_heading0</code> | If <code>_rowheader</code> is supplied, this is an optional heading above it in the template row. |  |
| <code>_before</code>, <code>_after</code> | This text is displayed before or after (respectively) the output of each template. These parameters introduce no whitespace on their own. |  |
| <code>_collapsible</code> | If set to "yes", the test case is made collapsible. The test case is collapsed and given a green heading if all the template outputs are the same. If any of the template outputs differ, the test case is expanded and given a yellow heading. |  |
| <code>_resetRefs</code> | If set to "yes", any references generated by the templates tested are reset after each template is expanded. |  |
| <code>_showcode</code> | Show the template code used to make the test case. If an invocation is specified with the <code>_code</code> parameter, then that is used. Otherwise, an approximation is generated from the arguments. This approximation is not perfect (whitespace in named arguments is lost; duplicate arguments are ignored) but it should be fine for template code that is input all on one line without spaces between parameters. |  |
| <code>_code</code> | Used to specify template code inside tags. This is used with the _showcode option to display the template invocation while preserving whitespace. You must use the magic word "__TEMPLATENAME__" instead of the template name. For example: . If you find yourself using this option a lot, you may want to consider using , which allows you to generate the entire test case from template code in nowiki tags, saving you from typing in all the arguments twice. <p>Note: due to the way nowiki tags work, the template treats the HTML entities &amp;lt;, &amp;gt; and &amp;quot; as if they were the literal characters &lt;, &gt; and " when used with this parameter.</p> |  |
| <code>_format</code> | It is possible to use this parameter to display completely different formats, for example test cases arranged in rows. Not all of the parameters here will work with the other formats. For details, see Template:Test case's documentation. | } |

## Examples

### Example 1
using Template:Year in South Africa, with  

;Usage  
<pre>  

</pre>  

;Output  

### Example 2
using Template:Infobox, with and  

;Usage  
<pre>  

</pre>  

;Output  

## Technical limitations

See Template:Test case#Technical limitations for this template's known technical limitations.