Jump to content
Wikipedia The Free Encyclopedia

Module:User:Dragons flight/Test

From Wikipedia, the free encyclopedia
Module documentationcreate purge
You might want to create a documentation page for this Scribunto module.
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this module.
 localz={
 error_categories={};
 message_tail={};
 }

 functionz.test(frame)
 locala=frame.args[1];
 localb=mw.text.nowiki('hi')

 -- frame:callParserFunction{ name = '#tag:ref', args = {
 -- 'some text', name = 'foo', group = 'bar' } }
 -- frame:extensionTag( "ref", "bob", {} )
 returnmw.uri.anchorEncode('');
 end

 -- Checks that parameter name is valid
 functionvalidate(name)
 name=tostring(name);

 -- Normal arguments
 ifwhitelist.basic_arguments[name]then
 returntrue;
 end

 -- Arguments with numbers in them
 name=name:gsub("%d+","#");
 ifwhitelist.numbered_arguments[name]then
 returntrue;
 end

 -- Not found, argument not supported.
 returnfalse;
 end

 functionz.citation(frame)
 localarglist=frame.args;
 localclock1,clock2;

 clock1=os.clock();
 forj=1,310do
 localwhitelist=mw.loadData('Module:Citation/CS1/Whitelist');
 end
 clock2=os.clock();

 returnclock2-clock1
 end

 returnz;

AltStyle によって変換されたページ (->オリジナル) /