!! Version 2
# Force the test runner to ensure the extension is loaded
!! functionhooks
af_list
!! endfunctionhooks
# This file tests the #af_list parser function
!! test
Test list with empty string
!! wikitext
{{#af_print: {{#af_list: }} }}
!! html
!! end
!! test
Test singleton list
!! wikitext
{{#af_print: {{#af_list: a }} }}
!! html
!! end
!! test
Test list of strings
!! wikitext
{{#af_print: {{#af_list: a | b | c }} }}
!! html
!! end
!! test
Test list remembers order
!! wikitext
{{#af_print: {{#af_list: b | c | a | e | d }} }}
!! html
!! end
!! test
Test list of integers
!! wikitext
{{#af_print: {{#af_list: {{#af_int: 1}} | {{#af_int: 2 }} | {{#af_int: 3 }} }} }}
!! html
!! end
!! test
Test list of booleans
!! wikitext
{{#af_print: {{#af_list: {{#af_bool: yes}} | {{#af_bool: no}} }} }}
!! html
!! end
!! test
Test list of lists
!! wikitext
{{#af_print: {{#af_list: {{#af_list: a | b | c }} | {{#af_list: d | e | f }} }} }}
!! html
!! end
!! test
Test list of objects
!! wikitext
{{#af_print: {{#af_list: {{#af_object: a=a | b=b | c=c }} | {{#af_object: d=d | e=e | f=f }} }} }}
!! html
!! end