!! 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 }} }} !! html3.14
!! end !! test Test print large float !! wikitext {{#af_print: {{#af_float: 100000000000000000000000000000000.0 }} }} !! html1.0E+32
!! end !! test Test print integer !! wikitext {{#af_print: {{#af_int: 1337 }} }} !! html1337
!! end !! test Test print true !! wikitext {{#af_print: {{#af_bool: yes }} }} !! htmltrue
!! end !! test Test print false !! wikitext {{#af_print: {{#af_bool: no }} }} !! htmlfalse
!! end !! test Test print one-dimensional list !! wikitext {{#af_print: {{#af_list: a | b | c }} }} !! htmlarray__^__notavalidarray
!! end !! test Test print invalid lists 2 !! wikitext {{#af_print: array__^__bm90YXZhbGlkYXJyYXk= }} !! htmlarray__^__bm90YXZhbGlkYXJyYXk=
!! end !! test Test print multiple values !! wikitext {{#af_print: {{#af_list: a }} | {{#af_list: a | b | c }} }} !! html