Jump to content

Module:Params/testcases/tcompare separated entries/doc

From Wikipedia, the free encyclopedia

This test template compares the behaviours of Module:Params with that of Module:Separated entries.

Usage

[edit]

For instance,

{{ module:params/testcases/tcompare separated entries | one | two | three | foo  | bar | Jupiter | hello = world }}

generates

Without a last separator:

{{#invoke:separated entries|main|separator=+}}

one+two+three+foo+bar+Jupiter

{{#invoke:params|sequential|squeezing|trimming_values|setting|i|+|list_values}}

one+two+three+foo+bar+Jupiter

With a last separator (::):

{{#invoke:params|sequential|squeezing|trimming_values|setting|i/l|+|::|list_values}}

one+two+three+foo+bar::Jupiter

{{#invoke:separated entries|main|separator=+|conjunction=::}}

one+two+three+foo+bar::Jupiter

With a last separator (::) and cutting the first three parameters:

{{#invoke:params|sequential|cutting|3|0|squeezing|trimming_values|setting|i/l|+|::|list_values}}

foo+bar::Jupiter

{{#invoke:separated entries|main|separator=+|conjunction=::|start=4}}

foo+bar::Jupiter