<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://chaldeanwiki.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AQuickTest</id>
		<title>Module:QuickTest - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://chaldeanwiki.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AQuickTest"/>
		<link rel="alternate" type="text/html" href="https://chaldeanwiki.com/index.php?title=Module:QuickTest&amp;action=history"/>
		<updated>2026-04-30T13:49:12Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.0</generator>

	<entry>
		<id>https://chaldeanwiki.com/index.php?title=Module:QuickTest&amp;diff=174&amp;oldid=prev</id>
		<title>Ian: 1 revision imported: Module:Fallback importing</title>
		<link rel="alternate" type="text/html" href="https://chaldeanwiki.com/index.php?title=Module:QuickTest&amp;diff=174&amp;oldid=prev"/>
				<updated>2015-03-30T21:07:17Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision imported: Module:Fallback importing&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:07, 30 March 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Ian</name></author>	</entry>

	<entry>
		<id>https://chaldeanwiki.com/index.php?title=Module:QuickTest&amp;diff=173&amp;oldid=prev</id>
		<title>Rillke: Fulfilling edit request by RP88. Thanks for helping!</title>
		<link rel="alternate" type="text/html" href="https://chaldeanwiki.com/index.php?title=Module:QuickTest&amp;diff=173&amp;oldid=prev"/>
				<updated>2014-12-31T03:40:57Z</updated>
		
		<summary type="html">&lt;p&gt;Fulfilling &lt;a href=&quot;/index.php?title=Template:Edit_request&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Template:Edit request (page does not exist)&quot;&gt;edit request&lt;/a&gt; by &lt;a href=&quot;/index.php?title=User:RP88&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:RP88 (page does not exist)&quot;&gt;RP88&lt;/a&gt;. Thanks for helping!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Tests whether a module has a test API, and if so, runs these tests&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.run(titleCurrentPage)&lt;br /&gt;
	local title = titleCurrentPage&lt;br /&gt;
	local titlesplit = mw.text.split(title, '/', true)&lt;br /&gt;
	if titlesplit[1]:find('Module:', 1, true) ~= 1 then return '' end&lt;br /&gt;
	if titlesplit[#titlesplit] == 'doc' then&lt;br /&gt;
		table.remove(titlesplit)&lt;br /&gt;
	end&lt;br /&gt;
	title = table.concat(titlesplit, '/')&lt;br /&gt;
	&lt;br /&gt;
	-- Load the module&lt;br /&gt;
	local m = require(title)&lt;br /&gt;
	local testFunction = ( ( type(m) == 'table' ) and m['runTests'] ) or nil&lt;br /&gt;
	local testFunctionType = type(testFunction)&lt;br /&gt;
	if ( testFunctionType ~= 'function' and not ( testFunctionType == 'table' and getmetatable(testFunction).__call ) ) then&lt;br /&gt;
		return '', title&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Execute the test function&lt;br /&gt;
	local ok, result = pcall(testFunction)&lt;br /&gt;
	if ok then&lt;br /&gt;
		return result, title&lt;br /&gt;
	else&lt;br /&gt;
		return 'error', title&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function cat(title, titleCurrentPage, cat)&lt;br /&gt;
	if titleCurrentPage == title then return cat end&lt;br /&gt;
	return ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.testModule(frame)&lt;br /&gt;
	local titleCurrentPage =  ( frame.args and frame.args.title ) or ( frame and frame:preprocess('{{FULLPAGENAME}}') ) or 'Frame not defined.'&lt;br /&gt;
	local testResult, title = p.run(titleCurrentPage)&lt;br /&gt;
	if testResult == true then&lt;br /&gt;
		return '[[File:Accept.png|16px|alt=Ok]] Tests passed. C.f. [[COM:LUA/T#auto]]' .. cat(title, titleCurrentPage, '[[Category:Scribunto modules with tests passed]]')&lt;br /&gt;
	elseif testResult == false then&lt;br /&gt;
		return '[[File:Bug error.png|16px|alt=Bug]] Tests failed. Run &amp;lt;code&amp;gt;=p.runTests()&amp;lt;/code&amp;gt; in the LUA console on [[' .. title .. ']] for more details.' .. cat(title, titleCurrentPage, '[[Category:Scribunto modules with tests failed]]')&lt;br /&gt;
	elseif testResult == 'error' then&lt;br /&gt;
		return '[[File:Error.png|16px|alt=Error]] Error executing tests.' .. cat(title, titleCurrentPage, '[[Category:Scribunto modules with errors executing tests]]')&lt;br /&gt;
	else&lt;br /&gt;
		return testResult .. cat(title, titleCurrentPage, '[[Category:Scribunto modules without test API]]')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.injectResult(frame)&lt;br /&gt;
	result = p.testModule(frame)&lt;br /&gt;
	if result == '' then return '' end&lt;br /&gt;
	&lt;br /&gt;
	return ( frame.args['pattern']:gsub('%%result%%', result) )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Rillke</name></author>	</entry>

	</feed>