Template:Template link general/testcases

From MOASSpedia
Jump to navigation Jump to search
no parameters
{{…|Abc}}
{{…|abC}}
{{…|abc}}
{{…|x0}}
{{…|code=on|x0}}
{{…|plaincode=on|x0}}
{{…|bold=on|x0}}
{{…|boldlink=on|x0}}
{{…|linksize=130%|x0}}
{{…|namesize=130%|x0}}
{{…|x1|one|italic=on}}
{{…|x1|one|italics=on}}
{{…|x0|nolink=on}}
{{…|x0|subst=on}}
{{…|x0|brace=on}}
{{…|x0|braceinside=on}}
{{…|x0|alttext=x0 link}}
{{…|x0|bold=on|code=on|brace=on}}
  • {{Template link general|x0|bold=on|code=on|brace=on}}{{x0}}
  • {{Template link general/sandbox|x0|bold=on|code=on|brace=on}}Template:Template link general/sandbox
  • No reason you can't combine multiple parameter setting
{{…|x1|one}}
{{…|x2|one|two}}
{{…|x2|bold=on|code=on|one|two}}
  • {{Template link general|x2|bold=on|code=on|one|two}}{{x2|one|two}}
  • {{Template link general/sandbox|x2|bold=on|code=on|one|two}}Template:Template link general/sandbox
  • Can combine named and anonymous parameters …
{{…|x2|one|two|bold=on|code=on}}
{{…|x2|one|code=on|two|bold=on|three}}
  • {{Template link general|x2|one|code=on|two|bold=on|three}}{{x2|one|two|three}}
  • {{Template link general/sandbox|x2|one|code=on|two|bold=on|three}}Template:Template link general/sandbox
  • … even intermixed …
{{…|x2|one|code=on|two|bold=on|three|italic=on}}
  • {{Template link general|x2|one|code=on|two|bold=on|three|italic=on}}{{x2|one|two|three}}
  • {{Template link general/sandbox|x2|one|code=on|two|bold=on|three|italic=on}}Template:Template link general/sandbox
  • … with many different configurations.
{{…|x3|1|2|3|4|5|6|7|8|9|10}}
{{…|x4|1|2|3|4|5|6|7|8|9|10|11}}
  • {{Template link general|x4|1|2|3|4|5|6|7|8|9|10|11}} → {{x4|1|2|3|4|5|6|7|8|9|10|11}}
  • {{Template link general/sandbox|x4|1|2|3|4|5|6|7|8|9|10|11}}Template:Template link general/sandbox
  • up to 10 parameters, then …
{{…|x5|1|2|3|4|5|6|7|8|9|10|11}}
  • {{Template link general|x5|1|2|3|4|5|6|7|8|9|10|11}} → {{x5|1|2|3|4|5|6|7|8|9|10|11}}
  • {{Template link general/sandbox|x5|1|2|3|4|5|6|7|8|9|10|11}}Template:Template link general/sandbox
  • | for more
{{…|x1|x=u}}
{{…|x1|x=u}}
{{…|x1|x{{=}}u}}
{{…|x1|x<nowiki>=</nowiki>u}}
  • {{Template link general|x1|x'"`UNIQ--nowiki-0000003E-QINU`"'u}} → {{x1|x=u}}
  • {{Template link general/sandbox|x1|x'"`UNIQ--nowiki-0000003E-QINU`"'u}}Error: expandTemplate: template "Template link general/sandbox" does not exist
  • sticky nowiki is okay
{{…|x2|<nowiki />|two|<nowiki />|<nowiki />}}
  • {{Template link general|x2|'"`UNIQ--nowiki-00000040-QINU`"'|two|'"`UNIQ--nowiki-00000041-QINU`"'|'"`UNIQ--nowiki-00000042-QINU`"'}} → {{x2||two||}}
  • {{Template link general/sandbox|x2|'"`UNIQ--nowiki-00000040-QINU`"'|two|'"`UNIQ--nowiki-00000041-QINU`"'|'"`UNIQ--nowiki-00000042-QINU`"'}}Error: expandTemplate: template "Template link general/sandbox" does not exist
{{…|x2|<nowiki>2=one</nowiki>|two}}
  • {{Template link general|x2|'"`UNIQ--nowiki-00000044-QINU`"'|two}} → {{x2|2=one|two}}
  • {{Template link general/sandbox|x2|'"`UNIQ--nowiki-00000044-QINU`"'|two}}Error: expandTemplate: template "Template link general/sandbox" does not exist
{{…|x2|<nowiki>3=two</nowiki>|<nowiki>2=one</nowiki>}}
  • {{Template link general|x2|'"`UNIQ--nowiki-00000046-QINU`"'|'"`UNIQ--nowiki-00000047-QINU`"'}} → {{x2|3=two|2=one}}
  • {{Template link general/sandbox|x2|'"`UNIQ--nowiki-00000046-QINU`"'|'"`UNIQ--nowiki-00000047-QINU`"'}}Error: expandTemplate: template "Template link general/sandbox" does not exist
  • right to left okay

Show results

{{…|Min|_show_result=y}}
{{…|Min|-7|_show_result=y}}
{{…|Min|1{{=}}-7|_show_result=y}}
  • {{Template link general|Min|1{{=}&#125;-7|_show_result=y}} → {{Template link general|Min|1{{=}}-7|_show_result=y}}
  • {{Template link general/sandbox|Min|1{{=}&#125;-7|_show_result=y}} → {{Template link general/sandbox|Min|1{{=}}-7|_show_result=y}}
  • Show results = -7
{{…|Min|7|-5|_show_result=y}}
{{…|Min|1{{=}}-7|2{{=}}-5|_show_result=y}}
  • {{Template link general|Min|1{{=}&#125;-7|2{{=}&#125;-5|_show_result=y}} → {{Template link general|Min|1{{=}}-7|2{{=}}-5|_show_result=y}}
  • {{Template link general/sandbox|Min|1{{=}&#125;-7|2{{=}&#125;-5|_show_result=y}} → {{Template link general/sandbox|Min|1{{=}}-7|2{{=}}-5|_show_result=y}}
  • Show results = -5
{{…|Min|-4|-6|0|_show_result=y|_expand=y}}
  • {{Template link general|Min|-4|-6|0|_show_result=y|_expand=y}} → {{Min|-4|-6|0}} → -6 [1]
  • {{Template link general/sandbox|Min|-4|-6|0|_show_result=y|_expand=y}}Template:Template link general/sandbox
  • Show results = -6; show template expand link
{{…|Min|1{{=}}-4|2{{=}}-6|3{{=}}0|_show_result=y|_expand=y}}
  • {{Template link general|Min|1{{=}&#125;-4|2{{=}&#125;-6|3{{=}}0|_show_result=y|_expand=y}} → {{Template link general|Min|1{{=}}-4|2{{=}}-6|3=0|_show_result=y|_expand=y}}
  • {{Template link general/sandbox|Min|1{{=}&#125;-4|2{{=}&#125;-6|3{{=}}0|_show_result=y|_expand=y}} → {{Template link general/sandbox|Min|1{{=}}-4|2{{=}}-6|3=0|_show_result=y|_expand=y}}
  • Show results = -6; show template expand link
{{…|ill|Charles Darwin (botanist)|text{{=}}Charles Darwin|fr|Charles Darwin|de|Charles Darwin|es|Charles Darwin|_show_result=y}}
  • {{Template link general|ill|Charles Darwin (botanist)|text{{=}}Charles Darwin|fr|Charles Darwin|de|Charles Darwin|es|Charles Darwin|_show_result=y}} → {{ill|Charles Darwin (botanist)|text=Charles Darwin|fr|Charles Darwin|de|Charles Darwin|es|Charles Darwin}} → Charles Darwin (botanist) [fr; de; es]
  • {{Template link general/sandbox|ill|Charles Darwin (botanist)|text{{=}}Charles Darwin|fr|Charles Darwin|de|Charles Darwin|es|Charles Darwin|_show_result=y}}Template:Template link general/sandbox
  • Mixed named positional parameters
{{…|Multiply|1,000|1,000|r{{=}}1|nosep{{=}}1|_show_result=yes|_expand=y}}
  • {{Template link general|Multiply|1,000|1,000|r{{=}}1|nosep{{=}}1|_show_result=yes|_expand=y}} → {{Multiply|1,000|1,000|r=1|nosep=1}} → 1000000 [2]
  • {{Template link general/sandbox|Multiply|1,000|1,000|r{{=}}1|nosep{{=}}1|_show_result=yes|_expand=y}}Template:Template link general/sandbox
  • Show results = 1000000; show template expand link; Mixed named positional parameters
{{…|Multiply|r{{=}}1|nosep{{=}}1|1,000|1,000|_show_result=yes|_expand=y}}
  • {{Template link general|Multiply|r{{=}}1|nosep{{=}}1|1,000|1,000|_show_result=yes|_expand=y}} → {{Multiply|r=1|nosep=1|1,000|1,000}} → 1000000 [3]
  • {{Template link general/sandbox|Multiply|r{{=}}1|nosep{{=}}1|1,000|1,000|_show_result=yes|_expand=y}}Template:Template link general/sandbox
  • Show results = 1000000; show template expand link; Mixed named positional parameters
{{…|Multiply|1,000|r{{=}}1|nosep{{=}}1|1,000|_show_result=yes|_expand=y}}
  • {{Template link general|Multiply|1,000|r{{=}}1|nosep{{=}}1|1,000|_show_result=yes|_expand=y}} → {{Multiply|1,000|r=1|nosep=1|1,000}} → 1000000 [4]
  • {{Template link general/sandbox|Multiply|1,000|r{{=}}1|nosep{{=}}1|1,000|_show_result=yes|_expand=y}}Template:Template link general/sandbox
  • Show results = 1000000; show template expand link; Mixed named positional parameters