!! 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 }} !! html

OK

!! end !! test Test false no alternative !! wikitext {{#af_if: false | OK }} !! html !! end !! test Test false with alternative !! wikitext {{#af_if: false | OK | Fail }} !! html

Fail

!! end !! test Test too few arguments !! wikitext {{#af_if: false }} !! html

ArrayFunctions (#af_if): Expected at least 2 positional parameters, 1 given.

!! end !! test Test too many arguments !! wikitext {{#af_if: false }} !! html

ArrayFunctions (#af_if): Expected at least 2 positional parameters, 1 given.

!! end