TDG EMPIRE
☰
Features
Wiki
Gallery
Webmap
Interactive Map
Punishments
Discord
Wiki
TDG Encyclopedia
Not logged in
Talk
Contributions
Create account
Log in
Search
Module
Discussion
Read
Edit source
Add topic
View history
Editing
Module talk:Yesno
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Testcases and documentation== <pre> {| class="wikitable" |+ Test Cases (via [[Template:Yesno/doc]]) |- ! Module output ! Template output ! Expected |- | {{#invoke:Yesno|yesno|yes}} | {{yesno|yes}} | yes |- | {{#invoke:Yesno|yesno|YeS}} | {{yesno|YeS}} | yes |- | {{#invoke:Yesno|yesno|Y}} | {{yesno|Y}} | yes |- | {{#invoke:Yesno|yesno|y}} | {{yesno|y}} | yes |- | {{#invoke:Yesno|yesno|no}} | {{yesno|no}} | ''(blank)'' |- | {{#invoke:Yesno|yesno|}} | {{yesno|}} | ''(blank)'' |- | {{#invoke:Yesno|yesno}} | {{yesno}} | ''(blank)'' |- | {{#invoke:Yesno|yesno|Β¬}} | {{yesno|Β¬}} | ''(blank)'' |- | {{#invoke:Yesno|yesno|purplemonkeydishwasher}} | {{yesno|purplemonkeydishwasher}} | yes |- | {{#invoke:Yesno|yesno|yes|yes=bacon}} | {{yesno|yes|yes=bacon}} | bacon |- | {{#invoke:Yesno|yesno|no|no=ham}} | {{yesno|no|no=ham}} | ham |- | {{#invoke:Yesno|yesno|blank= eggs}} | {{yesno|blank= eggs}} | |- | {{#invoke:Yesno|yesno|no=ham}} | {{yesno|no=ham}} | |- | {{#invoke:Yesno|yesno|blank= eggs|no=ham}} | {{yesno|blank= eggs|no=ham}} | |- | {{#invoke:Yesno|yesno|Β¬|Β¬=sausage}} | {{yesno|Β¬|Β¬=sausage}} | sausage |- | {{#invoke:Yesno|yesno|purplemonkeydishwasher|def=cup-of-tea}} | {{yesno|purplemonkeydishwasher|def=cup-of-tea}} | cup-of-tea |- | {{#invoke:Yesno|yesno|purplemonkeydishwasher|yes=bacon}} | {{yesno|purplemonkeydishwasher|yes=bacon}} | bacon |- | {{#invoke:Yesno|yesno|purplemonkeydishwasher|def=cup-of-tea|yes=bacon}} | {{yesno|purplemonkeydishwasher|def=cup-of-tea|yes=bacon}} | cup-of-tea |- | {{#invoke:Yesno|yesno|yes|yes=no|no=yes}} | {{yesno|yes|yes=no|no=yes}} | no |- | {{#invoke:Yesno|yesno|no|yes=no|no=yes}} | {{yesno|no|yes=no|no=yes}} | yes |- | {{#invoke:Yesno|yesno| no |no=no}} | {{yesno| no |no=no}} | no |} </pre> :<small>Note: Pre tags added to suppress script errors. β '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|βͺ talk βͺ]]</sup> 14:25, 20 September 2013 (UTC)</small> 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 actual implementation. I ultimately 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) :Just needs to handle spaces in the params better. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 11:41, 2 March 2013 (UTC) ::Thanks. Fixed. I moved your test case to the table above. --[[User:Ori.livneh|Ori.livneh]] ([[User talk:Ori.livneh|talk]]) 05:58, 3 March 2013 (UTC) :::Yesno has ~8M transclusions. No question it should handle the legacy 1:1. Test it. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 22:31, 11 March 2013 (UTC) The documentation is wrong. The "egg" example assumes thet the input value is ''blank''. But in the code examples the input parameter is ''omitted''. Compare: * <nowiki>{{yesno|blank= eggs|no=ham}}</nowiki> β {{yesno|blank= eggs|no=ham}} * <nowiki>{{yesno||blank= eggs|no=ham}}</nowiki> β {{yesno||blank= eggs|no=ham}} This is what is actually documented: * <nowiki>{{yesno|blank= eggs|no=ham|Β¬=bread}}</nowiki> β {{yesno|blank= eggs|no=ham|Β¬=bread}} :I have changed the documentation. Not the table above. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 13:16, 23 March 2013 (UTC)
Summary:
Please note that all contributions to TDG Encyclopedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TDG Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)