Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module talk:Yesno
(section)
Add languages
Page contents not supported in other languages.
Add topic
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
Add topic
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
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 freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)