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

Hello World!

!! end !! test Test integer !! wikitext {{#af_show: {{#af_int: 10 }} }} !! html

10

!! end !! test Test float !! wikitext {{#af_show: {{#af_float: 10.5 }} }} !! html

10.5

!! end !! test Test true !! wikitext {{#af_show: {{#af_bool: true }} }} !! html

true

!! end !! test Test false !! wikitext {{#af_show: {{#af_bool: false }} }} !! html

false

!! end !! test Test string with wikitext !! wikitext {{#af_show: == Hello World == }} !! html

Hello World

!! end !! test Test string with wikitext from array !! wikitext {{#af_show: {{#af_get: {{#af_map: {{#af_list: Hello World }} | v | == {{{v}}} == }} | 0 }} }} !! html

Hello World

!! end !! test Test too many arguments !! wikitext {{#af_show: a | b }} !! html

ArrayFunctions (#af_show): Expected at most 1 positional parameter, 2 given.

!! end !! test Test empty string !! wikitext {{#af_show: }} !! html !! end !! test Test idempotence !! wikitext {{#af_show: {{#af_show: == Hello World == }} }} !! html

Hello World

!! end !! test Test show print !! wikitext {{#af_print: {{#af_show: == Hello World == }} }} !! html

== Hello World ==

!! end