Difference between revisions of "Test Master"
From its-wiki.no
Josef.Noll (Talk | contribs) m (→Testing if) |
Josef.Noll (Talk | contribs) (→testing ifeq) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
A thesis has the status [[ThesisStatus::Planned]] | A thesis has the status [[ThesisStatus::Planned]] | ||
+ | === testing if === | ||
+ | <pre>{{#ifeq:{{{ThesisStatus|}}}|{{{ThesisStatus|-}}}| ThesisStatus was specified (and may be empty) | ThesisStatus was not specified }}</pre> | ||
+ | |||
+ | ''testing ThesisStatus in an ifeq:'' | ||
+ | {{#ifeq:{{{ThesisStatus|}}}|{{{ThesisStatus|-}}}| ThesisStatus was specified (and may be empty) | ThesisStatus was not specified }} | ||
+ | |||
+ | ''testing Template:Thesis with Parameter: '' | ||
+ | {{#if: {{Thesis|ThesisStatus=Ongoing}} | Thesis status planned | Thesis status something else }} | ||
+ | |||
+ | ''testing "weired" parameter 1 ...: '' | ||
+ | {{#if: {{{1|}}} | Parameter 1 - {{{1}}} is defined and non-null/non-empty | Parameter 1 {{{1}}} is not defined, or is defined but null. It contains only empty string(s) or breaking space(s) etc.}} | ||
+ | |||
+ | === testing ifeq === | ||
This page tests the if function for selecting a template | This page tests the if function for selecting a template | ||
<pre> | <pre> | ||
Line 7: | Line 20: | ||
− | What is ThesisStatus: {{{ThesisStatus| | + | What is ThesisStatus: {{{ThesisStatus|Ongoing}}} - |
* <nowiki> {{{ThesisStatus}}} </nowiki> is not executed | * <nowiki> {{{ThesisStatus}}} </nowiki> is not executed | ||
* <nowiki> {{ThesisStatus}} </nowiki>points to template Template:ThesisStatus | * <nowiki> {{ThesisStatus}} </nowiki>points to template Template:ThesisStatus | ||
Line 20: | Line 33: | ||
<pre> {{#if: {{{ThesisStatus}}}=Planned | yes | no}} - does not work, always yes</pre> | <pre> {{#if: {{{ThesisStatus}}}=Planned | yes | no}} - does not work, always yes</pre> | ||
− | {{#if: {{{ThesisStatus}}}= | + | {{#if: {{{ThesisStatus}}}=Open | yes | no}} |
__SHOWFACTBOX__ | __SHOWFACTBOX__ | ||
[[Category:IT-Help]] | [[Category:IT-Help]] |
Latest revision as of 22:16, 17 November 2014
Wiki for ITS | ||||||
---|---|---|---|---|---|---|
|
A thesis has the status Planned
testing if
{{#ifeq:{{{ThesisStatus|}}}|{{{ThesisStatus|-}}}| ThesisStatus was specified (and may be empty) | ThesisStatus was not specified }}
testing ThesisStatus in an ifeq: ThesisStatus was not specified
testing Template:Thesis with Parameter: Thesis status planned
testing "weired" parameter 1 ...: Parameter 1 {{{1}}} is not defined, or is defined but null. It contains only empty string(s) or breaking space(s) etc.
testing ifeq
This page tests the if function for selecting a template
{{#ifeq:{{NAMESPACE}}|UNIKUM|Form:UNIKUM_Kollokvie{{!}}Add UNIKUM Kollokvie}}
What is ThesisStatus: Ongoing -
- {{{ThesisStatus}}} is not executed
- {{ThesisStatus}} points to template Template:ThesisStatus
{{#ifeq:{{{Choose|}}}|true|this is true|this is false}} creates false...
this is false
Testing if
{{#if: {{{ThesisStatus}}}=Planned | yes | no}} - does not work, always yes
yes