!! Version 2 # Force the test runner to ensure the extension is loaded !! functionhooks af_print !! endfunctionhooks # This file tests the #af_print parser function !! test Test print string !! wikitext {{#af_print: Hello World! }} !! html

Hello World!

!! end !! test Test print wikitext !! wikitext {{#af_print: {{Hello world}} }} !! html

[[:Template:Hello world]]

!! end !! test Test print float !! wikitext {{#af_print: {{#af_float: 3.14 }} }} !! html

3.14

!! end !! test Test print large float !! wikitext {{#af_print: {{#af_float: 100000000000000000000000000000000.0 }} }} !! html

1.0E+32

!! end !! test Test print integer !! wikitext {{#af_print: {{#af_int: 1337 }} }} !! html

1337

!! end !! test Test print true !! wikitext {{#af_print: {{#af_bool: yes }} }} !! html

true

!! end !! test Test print false !! wikitext {{#af_print: {{#af_bool: no }} }} !! html

false

!! end !! test Test print one-dimensional list !! wikitext {{#af_print: {{#af_list: a | b | c }} }} !! html !! end !! test Test print multi-dimensional list !! wikitext {{#af_print: {{#af_list: a | b | {{#af_list: a | b | c }} }} }} !! html !! end !! test Test print invalid lists !! wikitext {{#af_print: array__^__notavalidarray }} !! html

array__^__notavalidarray

!! end !! test Test print invalid lists 2 !! wikitext {{#af_print: array__^__bm90YXZhbGlkYXJyYXk= }} !! html

array__^__bm90YXZhbGlkYXJyYXk=

!! end !! test Test print multiple values !! wikitext {{#af_print: {{#af_list: a }} | {{#af_list: a | b | c }} }} !! html !! end !! test Test print multiple values different end !! wikitext {{#af_print: {{#af_list: a }} | {{#af_list: a | b | c }} | end=\n }} !! html


!! end !! test Test print object !! wikitext {{#af_print: {{#af_object: a=a | b=b | c=c }} }} !! html !! end