编辑“︁
Template:Test case/doc
”︁(章节)
跳转到导航
跳转到搜索
这是
Test case
模板的
文档页面
。
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
== Common parameters == {| class="wikitable" |- ! Parameter !! Description |- | <code>_format</code> || The format used to display the test cases. This can be "[[#Columns|columns]]", "[[#Rows and tablerows|rows]]", "[[#Rows and tablerows|tablerows]]", "[[#Inline|inline]]" or "[[#Default|default]]". |- | <code>_output</code> || Allows changes in how the template's output is displayed. The default output is displayed when the {{code|_output}} parameter is not specified or when it is set to any unsupported value. A [[WP:NOWIKI|nowiki]] version of the template's output is displayed when {{para|_output|nowiki}}; this is helpful when there are differences in the underlying [[Help:Wikitext|wikitext]] which are not visible in the default output. Both the default output and nowiki version are displayed when {{para|_output|nowiki+}}. |- | <code>_collapsible</code> || If set to "y" or "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. See [[#Collapsible test cases]] for other parameters which only work when _collapsible is enabled. |- | <code>_template1</code>, <code>_template2</code>, <code>_template3</code>... || 要处理的模板的名称。默认情况下,_template1 是当前页面的基本页面。如果指定了 _template1,则 _template2 的默认值是其 /sandbox 子页面;如果没有指定 _template1,则 _template2 的默认值是当前页面的基本页面的 /sandbox 子页面。模板名称应该按照在正常模板调用中使用的方式输入,即"3x",而不是"Template:3x"。如果需要测试主名称空间中的页面,可以使用冒号前缀,即":''文章名称''"。 |- | <code>_template</code> || 作为 _template1 的别名。如果同时指定了 _template 和 _template1,则 _template 会优先使用。 |- | <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>, <code>_heading3</code>... || Custom headings for each of the templates. |- | <code>_showheader</code> || If this is set to "n" or "no", then no headers are shown. |- | <code>_before</code>, <code>_after</code> || Optional text to display before and after the output of each template. |- | <code>_resetRefs</code> || If set to "y" or "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 parameter, then that is used. Otherwise, an approximation is generated from the arguments. This approximation is not perfect - white space in named arguments is lost, and 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> || 用于在 {{tag|nowiki}} 标签内指定模板代码。这与 _showcode 选项一起使用,以显示模板调用并保留空格。您必须使用魔术词 "__TEMPLATENAME__" 而不是模板名称。例如:<code><nowiki>| _code = <nowiki>{{__TEMPLATENAME__|first|second|foo=bar}}</nowiki></nowiki></code>。如果您发现自己经常使用此选项,可以考虑使用 {{tl|test case nowiki}},它允许您从 nowiki 标签中的模板代码生成整个测试用例,避免您两次键入所有参数。注意:由于 nowiki 标签的工作方式,当与此参数一起使用时,模板将把 [[HTML 实体]] &lt;、&gt; 和 &quot; 视为文字字符 <、> 和 "。 |}
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模板
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息