!! Version 2 # Force the test runner to ensure the extension is loaded !! functionhooks af_reverse !! endfunctionhooks # This file tests the #af_reverse parser function !! test Test simple list !! wikitext {{#af_print: {{#af_reverse: {{#af_list: a | b | c }} }} }} !! html !! end !! test Test simple object !! wikitext {{#af_print: {{#af_reverse: {{#af_object: a=a | b=b | c=c }} }} }} !! html !! end !! test Test too many arguments !! wikitext {{#af_reverse: {{#af_list: a | b | c }} | foo }} !! html

ArrayFunctions (#af_reverse): Expected at most 1 positional parameter, 2 given.

!! end !! test Test invalid type !! wikitext {{#af_reduce: }} !! html

ArrayFunctions (#af_reduce): Could not match expected type array with actual type empty for parameter 1 ("").

!! end