!! Version 2 # Force the test runner to ensure the extension is loaded !! functionhooks af_object !! endfunctionhooks # This file tests the #af_object parser function !! test Test object with empty value !! wikitext {{#af_print: {{#af_object: a= }} }} !! html !! end !! test Test object with duplicate keys !! wikitext {{#af_print: {{#af_object: a=a | a=b }} }} !! html !! end !! test Test object without keys !! wikitext {{#af_object: a | b | c }} !! html

ArrayFunctions (#af_object): Expected at most 0 positional parameters, 3 given.

!! end !! test Test object of booleans !! wikitext {{#af_print: {{#af_object: a={{#af_bool: yes}} | b={{#af_bool: no }} }} }} !! html !! end !! test Test object of objects !! wikitext {{#af_print: {{#af_object: a={{#af_object: a={{#af_object: a=b }} }} }} }} !! html !! end !! test Test key with space !! wikitext {{#af_print: {{#af_object: foo bar=boofar }} }} !! html !! end !! test Test numeric keys !! wikitext {{#af_print: {{#af_object: 12=boofar }} }} !! html !! end