Template:Ifsubst/testcases

From Wikipedia, the free encyclopedia


Sandbox version[edit]

{{ ifsubst/sandbox | yes | no }} Script error: No such module "Is subst".

{{ ifsubst/sandbox | yes | no | demo=no}} Script error: No such module "Is subst".

{{ ifsubst/sandbox | yes | no | demo=yes}} Script error: No such module "Is subst".

{{ ifsubst/sandbox | yes | no | demo=}} Script error: No such module "Is subst".

{{ subst:ifsubst/sandbox | yes | no }} yes

{{ subst:ifsubst/sandbox | yes | no |demo=no}} yes

{{ subst:ifsubst/sandbox | yes | no |demo=yes}} This call will return "yes" when substituted and "no" when transcluded.

{{ subst:ifsubst/sandbox | yes | no |demo=}} yes

Main template[edit]

{{ ifsubst | yes | no }} no

{{ ifsubst | yes | no | demo=no}} no

{{ ifsubst | yes | no | demo=yes}} yes

{{ ifsubst | yes | no | demo=}} no

{{ subst:ifsubst | yes | no }} yes

{{ subst:ifsubst | yes | no |demo=no}} no

{{ subst:ifsubst | yes | no |demo=yes}} yes

{{ subst:ifsubst | yes | no |demo=}} yes