Difference between revisions of "Template:Eval/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Andrybak
(improve test cases)
imported>Andrybak
(replace)
 
Line 1: Line 1:
 
{{Testcases notice <!--|toc=on-->}}
 
{{Testcases notice <!--|toc=on-->}}
  
{{Eval|Replace{{!}}param2{{!}}p3{{!}}p4{{!}}p5}}
+
Template {{tl|Eval}} must always be [[WP:SUBST|substituted]]. To test the sandbox, copy-paste the code below to the section "Test result".
  
{{Replace{{!}}param2{{!}}p3{{!}}p4{{!}}p5}}
+
<syntaxhighlight lang="moin">
 
+
{{subst:Eval|Replace|bar bar Foo bar baz bar{{!}}bar{{!}}xyzzy{{!}}count{{=}}2}}
{{Eval|Replace|param2{{!}}p3{{!}}p4{{!}}p5}}
+
----
 
+
{{subst:Eval/sandbox|Replace|bar bar Foo bar baz bar{{!}}bar{{!}}xyzzy{{!}}count{{=}}2}}
{{Replace{{!}}param2{{!}}p3{{!}}p4{{!}}p5}}
+
</syntaxhighlight>
 
 
{{Eval|Replace}}
 
 
 
{{Replace}}
 
 
 
{{Test case nowiki|collapsible=yes|showcode=yes|title={{tl|Replace}}|<nowiki>
 
{{__TEMPLATENAME__|Replace|Foo bar baz{{!}}bar{{!}}xyzzy}}
 
</nowiki>
 
}}
 
 
 
{{Test case nowiki|collapsible=yes|showcode=yes|title={{tl|Replace}} 2|<nowiki>
 
{{__TEMPLATENAME__|Replace|bar bar Foo bar baz bar{{!}}bar{{!}}xyzzy{{!}}count{{=}}2}}
 
</nowiki>
 
}}
 
  
 +
== Test result ==
 +
{{Replace{{!}}bar bar Foo bar baz bar{{!}}bar{{!}}xyzzy{{!}}count{{=}}2}}
 +
----
 +
<!--
 +
--
 +
-- Add your experimental template code here.
 +
--
 +
-->
  
 +
{{!}}
  
 
<!--
 
<!--
{{clear}}
+
--
== References ==
+
-- Don't experiment beyond here.
{{reflist}}
+
--
-->
+
-->

Latest revision as of 18:51, 29 September 2020

Template {{Eval}} must always be substituted. To test the sandbox, copy-paste the code below to the section "Test result".

{{subst:Eval|Replace|bar bar Foo bar baz bar{{!}}bar{{!}}xyzzy{{!}}count{{=}}2}}
----
{{subst:Eval/sandbox|Replace|bar bar Foo bar baz bar{{!}}bar{{!}}xyzzy{{!}}count{{=}}2}}

Test result

{{Replace|bar bar Foo bar baz bar|bar|xyzzy|count=2}}


|