Module talk:Template test case: Difference between revisions

Content deleted Content added
m Replaced deprecated <source> tags with <syntaxhighlight> (via WP:JWB)
A columns + inline hybrid format?
Line 109:
::As for the config file, this is not intended to be specified by users. I believe I allowed the config to be passed to the main function so that it can be more easily tested, but this ability is not currently used by [[Module:Template test case/testcases]]. I probably only used it in the console during initial development. Also, the config cannot be passed from wikitext; it needs to be passed from another Lua module. From wikitext you can only influence the contents of the first parameter (the frame object) to the function called from #invoke; you can't influence the contents of subsequent parameters. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 01:45, 26 December 2021 (UTC)
::: Thanks, [[User:Mr. Stradivarius|Mr. Stradivarius]], this was very helpful. [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 17:26, 26 December 2021 (UTC)
 
== format=columns + inline hybrid ==
I've a bunch of test cases for a template that takes lots of complicated parameters, but whose output is a relatively short text. Think {{tl|cite book}} and you're in the ballpark. I want to see the code up top in a nowiki block like {{tlx|test case nowiki|format{{=}}columns}} or {{para|format|rows}} gives me, but I'd like to see the output arranged vertically like {{tlx|test case nowiki|format{{=}}inline}} gives me.
 
Something like:
{{cot|Example of desired output}}
<code><pre><nowiki>{{example
|first-argument = has a value
|second-argument = does too
|veni-vidi-vici = yes
|lipsum = lorem
}}</nowiki></pre></code>
* ''Veni, vidi, vici''
* ''Lorem ipsum dolor sit amet''
{{cob}}
 
Any takers? [[User:Mr. Stradivarius|Mr. Stradivarius]]? --[[User:Xover|Xover]] ([[User talk:Xover|talk]]) 08:45, 13 January 2023 (UTC)