!! Version 2 # Force the test runner to ensure the extension is loaded !! functionhooks af_group !! endfunctionhooks # This file tests the #af_group parser function !! test Test simple list !! wikitext {{#af_print: {{#af_group: {{#af_list: a | b | c }} }} }} !! html !! end !! test Test simple two-dimensional list !! wikitext {{#af_print: {{#af_group: {{#af_list: {{#af_list: a | b | c }} | {{#af_list: d | e | f }} | {{#af_list: g | h | i }} }} }} }} !! html
!! end !! test Test list with a single element !! wikitext {{#af_print: {{#af_group: {{#af_list: a }} }} }} !! html
!! end !! test Test object with a single element !! wikitext {{#af_print: {{#af_group: {{#af_object: a={{#af_list: a }} }} }} }} !! html
ArrayFunctions (#af_group): Could not match expected type array with actual type empty for parameter 1 ("").
!! end !! test Test single-dimensional list !! wikitext {{#af_print: {{#af_group: {{#af_list: x | y | z }} }} }} !! html !! end !! test Test single object with scalar values !! wikitext {{#af_print: {{#af_group: {{#af_object: key1=value1 | key2=value2 }} }} }} !! html !! end !! test Test group with invalid input type !! wikitext {{#af_group: invalidInput }} !! htmlArrayFunctions (#af_group): Could not match expected type array with actual type string for parameter 1 ("invalidInput").
!! end !! test Test empty nested arrays !! wikitext {{#af_print: {{#af_group: {{#af_list: {{#af_list: }} | {{#af_list: }} }} }} }} !! html