Jump to content

Module talk:Yesno: Difference between revisions

From Fifth Empire Wiki
Template output does not match its own documentation. Blah.
+Note about discrepancy between ideal and actual template behavior
Line 24: Line 24:
| {{#invoke:Yesno|yesno|no}}
| {{#invoke:Yesno|yesno|no}}
| {{yesno|no}}
| {{yesno|no}}
|
| ''(blank)''
|-
|-
| {{#invoke:Yesno|yesno|}}
| {{#invoke:Yesno|yesno|}}
| {{yesno|}}
| {{yesno|}}
|
| ''(blank)''
|-
|-
| {{#invoke:Yesno|yesno}}
| {{#invoke:Yesno|yesno}}
| {{yesno}}
| {{yesno}}
|
| ''(blank)''
|-
|-
| {{#invoke:Yesno|yesno|¬}}
| {{#invoke:Yesno|yesno|¬}}
| {{yesno|¬}}
| {{yesno|¬}}
|
| ''(blank)''
|-
|-
| {{#invoke:Yesno|yesno|purplemonkeydishwasher}}
| {{#invoke:Yesno|yesno|purplemonkeydishwasher}}
Line 87: Line 87:
|}
|}


--[[User:Ori.livneh|Ori.livneh]] ([[User talk:Ori.livneh|talk]]) 10:46, 28 February 2013 (UTC)
As you can see, the template does not behave exactly as its documentation claims it does. I was not sure which to regard as authoritative, the ideal or behavior implementation, so I went with the former. Removing <code>and not any</code> from the Lua code will make the module behave like exactly like the template. --[[User:Ori.livneh|Ori.livneh]] ([[User talk:Ori.livneh|talk]]) 10:46, 28 February 2013 (UTC)

Revision as of 11:28, 28 February 2013

Test Cases (via Template:Yesno/doc)
Module output Template output Expected
Script error: The module returned a function value. It is supposed to return an export table. yes yes
Script error: The module returned a function value. It is supposed to return an export table. yes yes
Script error: The module returned a function value. It is supposed to return an export table. yes yes
Script error: The module returned a function value. It is supposed to return an export table. yes yes
Script error: The module returned a function value. It is supposed to return an export table. (blank)
Script error: The module returned a function value. It is supposed to return an export table. (blank)
Script error: The module returned a function value. It is supposed to return an export table. (blank)
Script error: The module returned a function value. It is supposed to return an export table. (blank)
Script error: The module returned a function value. It is supposed to return an export table. yes yes
Script error: The module returned a function value. It is supposed to return an export table. bacon bacon
Script error: The module returned a function value. It is supposed to return an export table. ham ham
Script error: The module returned a function value. It is supposed to return an export table. eggs
Script error: The module returned a function value. It is supposed to return an export table. ham
Script error: The module returned a function value. It is supposed to return an export table. eggs
Script error: The module returned a function value. It is supposed to return an export table. sausage sausage
Script error: The module returned a function value. It is supposed to return an export table. cup-of-tea cup-of-tea
Script error: The module returned a function value. It is supposed to return an export table. bacon bacon
Script error: The module returned a function value. It is supposed to return an export table. cup-of-tea cup-of-tea
Script error: The module returned a function value. It is supposed to return an export table. no no
Script error: The module returned a function value. It is supposed to return an export table. yes yes

As you can see, the template does not behave exactly as its documentation claims it does. I was not sure which to regard as authoritative, the ideal or behavior implementation, so I went with the former. Removing and not any from the Lua code will make the module behave like exactly like the template. --Ori.livneh (talk) 10:46, 28 February 2013 (UTC)