!! Version 2 # Force the test runner to ensure the extension is loaded !! functionhooks af_trim !! endfunctionhooks # This file tests the #af_trim parser function !! test Test trim with exclamation mark !! wikitext {{#af_print: {{#af_map: {{#af_split: !a!, !b!, !c! }} | v | {{#af_trim: {{{v}}} | ! }} }} }} !! html
a
!! end !! test Test too few arguments !! wikitext {{#af_trim: a }} !! htmlArrayFunctions (#af_trim): Expected at least 2 positional parameters, 1 given.
!! end !! test Test too many arguments !! wikitext {{#af_trim: a | \s | v }} !! htmlArrayFunctions (#af_trim): Expected at most 2 positional parameters, 3 given.
!! end