!! 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 }} }} !! html10
!! end !! test Test float !! wikitext {{#af_show: {{#af_float: 10.5 }} }} !! html10.5
!! end !! test Test true !! wikitext {{#af_show: {{#af_bool: true }} }} !! htmltrue
!! end !! test Test false !! wikitext {{#af_show: {{#af_bool: false }} }} !! htmlfalse
!! end !! test Test string with wikitext !! wikitext {{#af_show: == Hello World == }} !! htmlArrayFunctions (#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