Module:Params/testcases/tnumerical: Difference between revisions
From Kenshi Wiki
More actions
Prd created the page Module:Params/testcases/tnumerical using a non-default content model "wikitext" |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{| class="wikitable" | |||
|- | |||
! Function name | |||
! Result for {{para|#first|{{{#first}}}}} and {{para|#second|{{{#second}}}}} | |||
|- | |||
| <code>[[Module:Params#squeezing|squeezing]]</code> | |||
| {{#invoke:params|all_sorted|with_name_not_matching|#first|strict|with_name_not_matching|#second|strict|squeezing|for_each||$#=$@}} | |||
|- | |||
| <code>[[Module:Params#filling_the_gaps|filling_the_gaps]]</code> | |||
| {{#invoke:params|all_sorted|with_name_not_matching|#first|strict|with_name_not_matching|#second|strict|filling_the_gaps|for_each||$#=$@}} | |||
|- | |||
| <code>[[Module:Params#clearing|clearing]]</code> | |||
| {{#invoke:params|all_sorted|with_name_not_matching|#first|strict|with_name_not_matching|#second|strict|clearing|for_each||$#=$@}} | |||
|- | |||
| <code>[[Module:Params#cutting|cutting]]|{{{#first|0}}}|{{{#second|0}}}]</code> | |||
| {{#invoke:params|all_sorted|with_name_not_matching|#first|strict|with_name_not_matching|#second|strict|cutting|{{{#first|0}}}|{{{#second|0}}}|for_each||$#=$@}} | |||
|- | |||
| <code>[[Module:Params#cropping|cropping]]|{{{#first|0}}}|{{{#second|0}}}</code> | |||
| {{#invoke:params|all_sorted|with_name_not_matching|#first|strict|with_name_not_matching|#second|strict|cropping|{{{#first|0}}}|{{{#second|0}}}|for_each||$#=$@}} | |||
|- | |||
| <code>[[Module:Params#purging|purging]]|{{{#first|0}}}|{{{#second|0}}}</code> | |||
| {{#invoke:params|all_sorted|with_name_not_matching|#first|strict|with_name_not_matching|#second|strict|purging|{{{#first|0}}}|{{{#second|0}}}|for_each||$#=$@}} | |||
|- | |||
| <code>[[Module:Params#backpurging|backpurging]]|{{{#first|0}}}|{{{#second|0}}}</code> | |||
|{{#invoke:params|all_sorted|with_name_not_matching|#first|strict|with_name_not_matching|#second|strict|backpurging|{{{#first|0}}}|{{{#second|0}}}|for_each||$#=$@}} | |||
|- | |||
| <code>[[Module:Params#rotating|rotating]]</code> | |||
| {{#invoke:params|all_sorted|with_name_not_matching|#first|strict|with_name_not_matching|#second|strict|rotating|for_each||$#=$@}} | |||
|- | |||
| <code>[[Module:Params#sorting_sequential_values|sorting_sequential_values]]</code> | |||
| {{#invoke:params|all_sorted|with_name_not_matching|#first|strict|with_name_not_matching|#second|strict|sorting_sequential_values|for_each||$#=$@}} | |||
|}</includeonly><noinclude>{{Documentation|heading=[[File:Test Template Info-Icon - Version (2).svg|50px|alt=|link=]] Template documentation}}</noinclude> |
Latest revision as of 05:06, 9 March 2025
This test template allows to experiment with functions that focus on numerical and sequential arguments. As these require at most two arguments, this template uses the |#first=
and |#second=
special parameters to do its tests.
Usage
For instance,
{{module:params/testcases/tnumerical
| #first = 2
| #second = 2
| -2 = minus two
| 0 = zero
| 1 = one
| 2 = two
| 3 = three
| 19 = nineteen
| 20 = twenty
}}
generates
Function name | #first=2 and |#second=2
|
---|---|
squeezing
|
1=minus two|2=zero|3=one|4=two|5=three|6=nineteen|7=twenty |
filling_the_gaps
|
-2=minus two|-1=|0=zero|1=one|2=two|3=three|4=|5=|6=|7=|8=|9=|10=|11=|12=|13=|14=|15=|16=|17=|18=|19=nineteen|20=twenty |
clearing
|
1=one|2=two|3=three |
cutting|2|2]
|
-2=minus two|0=zero|16=nineteen|17=twenty |
cropping|2|2
|
0=zero|1=one|2=two|3=three |
purging|2|2
|
-2=minus two|0=zero|1=one|17=nineteen|18=twenty |
backpurging|2|2
|
-2=minus two|0=zero|1=three|17=nineteen|18=twenty |
rotating
|
1=twenty|2=nineteen|18=three|19=two|20=one|21=zero|23=minus two |
sorting_sequential_values
|
-2=minus two|0=zero|1=one|2=three|3=two|19=nineteen|20=twenty |