!! Version 2 # Force the test runner to ensure the extension is loaded !! functionhooks af_sort !! endfunctionhooks # This file tests the #af_sort parser function !! test Test sort ascending !! wikitext {{#af_print: {{#af_sort: {{#af_list: b | a }} }} }} !! html !! end !! test Test sort descending !! wikitext {{#af_print: {{#af_sort: {{#af_list: a | b }} | descending=true }} }} !! html !! end !! test Test sort case insensitive !! wikitext {{#af_print: {{#af_sort: {{#af_list: a | A | b | B }} | caseinsensitive=true }} }} !! html !! end !! test Test sort case sensitive !! wikitext {{#af_print: {{#af_sort: {{#af_list: a | A | b | B }} }} }} !! html !! end !! test Test sort object !! wikitext {{#af_print: {{#af_sort: {{#af_object: b=b | a=a }} }} }} !! html !! end !! test Test too many arguments !! wikitext {{#af_sort: {{#af_list: b | a }} | v }} !! html

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

!! end