!! Version 2 # Force the test runner to ensure the extension is loaded !! functionhooks af_if !! endfunctionhooks # This file tests the #af_if parser function !! test Test true no alternative !! wikitext {{#af_if: true | OK }} !! html
OK
!! end !! test Test true with alternative !! wikitext {{#af_if: true | OK | Fail }} !! htmlOK
!! end !! test Test false no alternative !! wikitext {{#af_if: false | OK }} !! html !! end !! test Test false with alternative !! wikitext {{#af_if: false | OK | Fail }} !! htmlFail
!! end !! test Test too few arguments !! wikitext {{#af_if: false }} !! htmlArrayFunctions (#af_if): Expected at least 2 positional parameters, 1 given.
!! end !! test Test too many arguments !! wikitext {{#af_if: false }} !! htmlArrayFunctions (#af_if): Expected at least 2 positional parameters, 1 given.
!! end