Content deleted Content added
→Option to invoke a module: Temporary solution |
→showcode and templates in parameter values?: new section |
||
(One intermediate revision by one other user not shown) | |||
Line 329:
:@[[User:Aidan9382|Aidan9382]]: are you familiar with this module? — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 09:53, 18 February 2025 (UTC)
::From a quick read of the documentation, it seems to be possible to force a module test if you use {{tl|Test case nowiki}}, e.g. <syntaxhighlight lang=wikitext inline>{{Test case nowiki|template=Disambiguation|heading1=[[Module:Disambiguation]]|heading2=[[Module:Disambiguation/sandbox]]|<nowiki>{{#invoke:__TEMPLATENAME__|isDisambiguationPage|Paris}}</nowiki>}}</syntaxhighlight>. The headers it normally provides will form template links instead of module links, so you have to specify the headers manually. A little hacky, but that's at least a way you can do it right now. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 11:20, 18 February 2025 (UTC)
== Similar module with known answer rather than live v. sandbox==
This module compares the live result to the production result. I'm interested in comparing the live result, production result, or both to a known good result. For example, I'm testing date-related templates. I have a book with a list of information about dates, such as the Gregorian calendar date, Julian calendar date, [[Julian day]], and day of the week. I'd like to compare the result from a template to what this book says the result should be.
Any suggestions? [[User:Jc3s5h|Jc3s5h]] ([[User talk:Jc3s5h|talk]]) 11:53, 18 March 2025 (UTC)
== _showcode and templates in parameter values? ==
Using another template in the tested template parameters, like this:
{{demo|sep=produces
|<nowiki>{{test case |_showcode=1 |_template=tq |_template2=!tq
|1=parameter {{nobr|with a}} template }}
</nowiki>}}
That is, the inner template is substituted before showing the code. Can this be avoided somehow (without duplicating the whole set of parameters in <code><nowiki>_code=<nowiki>{{__TEMPLATENAME__|...}}</nowiki></nowiki></code>)? — [[User:Mikhail Ryazanov|Mikhail Ryazanov]] ([[User talk:Mikhail Ryazanov|talk]]) 23:10, 6 June 2025 (UTC)
|