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

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

!! end