Module talk:Template test case: Difference between revisions

Content deleted Content added
Line 103:
{{test case|_template1=Find sources|_template2=Find sources/sandbox|_template3=Find sources/sandbox2|Foo}}
:The module is built so that the default value for _template1 is the base page of the current page, and the default value for _template2 is its sandbox subpage. In fact, if you are calling the module from [[Template:Find sources/testcases]], you could omit the {{para|_template1}} and {{para|_template2}} arguments, and just specify {{para|_template3|Find sources/sandbox2}} to get the same results. — '''''[[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:17, 26 December 2021 (UTC)
::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)