<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://commons.islamical.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AInformation%2Ftestcases</id>
	<title>Module:Information/testcases - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://commons.islamical.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AInformation%2Ftestcases"/>
	<link rel="alternate" type="text/html" href="https://commons.islamical.org/w/index.php?title=Module:Information/testcases&amp;action=history"/>
	<updated>2026-09-27T04:49:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://commons.islamical.org/w/index.php?title=Module:Information/testcases&amp;diff=3852&amp;oldid=prev</id>
		<title>Shahroudi: Created page with &quot;-- Unit tests for Module:Name date function. Click talk page to run tests. require(&#039;strict&#039;) local TUT = mw.title.new(mw.getCurrentFrame():getTitle()).basePageTitle -- the title under test local Info = require(TUT.prefixedText) -- the module to be tested local ScribuntoUnit = require(&#039;Module:ScribuntoUnit&#039;) local suite = ScribuntoUnit:new()  function suite:test_outer() 	local mod = &#039;{{#invoke:&#039; .. TUT.text .. &#039;| &#039; 	self:assertSameResult(Info._Wikitext_Date(&#039;2012-09-1...&quot;</title>
		<link rel="alternate" type="text/html" href="https://commons.islamical.org/w/index.php?title=Module:Information/testcases&amp;diff=3852&amp;oldid=prev"/>
		<updated>2025-11-05T02:47:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- Unit tests for &lt;a href=&quot;/w/index.php?title=Module:Name&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:Name (page does not exist)&quot;&gt;Module:Name&lt;/a&gt; date function. Click talk page to run tests. require(&amp;#039;strict&amp;#039;) local TUT = mw.title.new(mw.getCurrentFrame():getTitle()).basePageTitle -- the title under test local Info = require(TUT.prefixedText) -- the module to be tested local ScribuntoUnit = require(&amp;#039;Module:ScribuntoUnit&amp;#039;) local suite = ScribuntoUnit:new()  function suite:test_outer() 	local mod = &amp;#039;{{#invoke:&amp;#039; .. TUT.text .. &amp;#039;| &amp;#039; 	self:assertSameResult(Info._Wikitext_Date(&amp;#039;2012-09-1...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Unit tests for [[Module:Name]] date function. Click talk page to run tests.&lt;br /&gt;
require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
local TUT = mw.title.new(mw.getCurrentFrame():getTitle()).basePageTitle -- the title under test&lt;br /&gt;
local Info = require(TUT.prefixedText) -- the module to be tested&lt;br /&gt;
local ScribuntoUnit = require(&amp;#039;Module:ScribuntoUnit&amp;#039;)&lt;br /&gt;
local suite = ScribuntoUnit:new()&lt;br /&gt;
&lt;br /&gt;
function suite:test_outer()&lt;br /&gt;
	local mod = &amp;#039;{{#invoke:&amp;#039; .. TUT.text .. &amp;#039;| &amp;#039;&lt;br /&gt;
	self:assertSameResult(Info._Wikitext_Date(&amp;#039;2012-09-17&amp;#039;, &amp;#039;en&amp;#039;),                                   mod..&amp;#039;Wikitext_Date  |date=2012-09-17|lang=en}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(Info._Wikitext_Source(&amp;#039;Q98140374/Q98057938&amp;#039;, &amp;#039;en&amp;#039;),                        mod..&amp;#039;Wikitext_Source|source=Q98140374/Q98057938|lang=en}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(Info._SDC_Author(      mw.wikibase.getEntity( &amp;#039;M21436087&amp;#039; ), &amp;#039;en&amp;#039;, false), mod..&amp;#039;SDC_Author     |mid=M21436087 |lang=en|icon=0}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(Info._SDC_Date(        mw.wikibase.getEntity( &amp;#039;M21436087&amp;#039; ), &amp;#039;en&amp;#039;, false), mod..&amp;#039;SDC_Date       |mid=M21436087 |lang=en|icon=0}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(Info._SDC_Description( mw.wikibase.getEntity( &amp;#039;M4184419&amp;#039;  ), &amp;#039;en&amp;#039;, false), mod..&amp;#039;SDC_Description|mid=M4184419  |lang=en|icon=0}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(Info._SDC_Source(      mw.wikibase.getEntity( &amp;#039;M92783235&amp;#039; ), &amp;#039;en&amp;#039;, false), mod..&amp;#039;SDC_Source     |mid=M92783235 |lang=en|icon=0}}&amp;#039;)&lt;br /&gt;
end &lt;br /&gt;
 &lt;br /&gt;
function suite:test_SDC_author()&lt;br /&gt;
	self:assertSameResult(&amp;#039;[[User:HildaMorassi|Hilda Morassi]]&amp;#039;,               Info._SDC_Author(mw.wikibase.getEntity( &amp;#039;M21436087&amp;#039; ), &amp;#039;en&amp;#039;, false))&lt;br /&gt;
	self:assertSameResult(&amp;#039;[[User:Bijay chaurasia|Bijay chaurasia]]&amp;#039;,          Info._SDC_Author(mw.wikibase.getEntity( &amp;#039;M51870570&amp;#039; ), &amp;#039;en&amp;#039;, false))&lt;br /&gt;
	self:assertSameResult(&amp;#039;[https://www.geograph.org.uk/profile/17899 Row17]&amp;#039;, Info._SDC_Author(mw.wikibase.getEntity( &amp;#039;M13811643&amp;#039; ), &amp;#039;en&amp;#039;, false))&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{Label|Q34788025}}&amp;#039;,                               Info._SDC_Author(mw.wikibase.getEntity( &amp;#039;M37557200&amp;#039; ), &amp;#039;en&amp;#039;, false))&lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
function suite:test_SDC_date()&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{Date|2012|09|17|lang=en}}&amp;#039;,                                      Info._SDC_Date(mw.wikibase.getEntity( &amp;#039;M21436087&amp;#039; ), &amp;#039;en&amp;#039;, false))&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{Date|2008|12|25|lang=en}}&amp;#039;,                                      Info._SDC_Date(mw.wikibase.getEntity( &amp;#039;M13811643&amp;#039; ), &amp;#039;en&amp;#039;, false))&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Wikidata date|date|item=M99950|property=P571|lang=en}}&amp;#039;, Info._SDC_Date(mw.wikibase.getEntity( &amp;#039;M99950&amp;#039;    ), &amp;#039;en&amp;#039;, false))&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Date|mid=M99950    |lang=en|icon=0}} &amp;lt;div style=&amp;quot;display: none;&amp;quot;&amp;gt;date QS:P,+2005-00-00T00:00:00Z/9,P1480,Q5727902&amp;lt;/div&amp;gt;&amp;#039;, &amp;#039;{{other date|~|2005|lang=en}}&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function suite:xtest_wikitext_date()&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{Date|2012|09|17|20|17|40|lang=en}}&amp;#039;, Info._Wikitext_Date(&amp;#039;2012-09-17 20:17:40&amp;#039;, &amp;#039;en&amp;#039;))&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{Date|2012|09|17|20|17   |lang=en}}&amp;#039;, Info._Wikitext_Date(&amp;#039;2012-09-17 20:17&amp;#039;,    &amp;#039;en&amp;#039;))&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{Date|2012|09|17         |lang=en}}&amp;#039;, Info._Wikitext_Date(&amp;#039;2012-09-17&amp;#039;,          &amp;#039;en&amp;#039;))&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{Date|2012|09            |lang=en}}&amp;#039;, Info._Wikitext_Date(&amp;#039;2012-09&amp;#039;,             &amp;#039;en&amp;#039;))&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{Date|2012               |lang=en}}&amp;#039;, Info._Wikitext_Date(&amp;#039;2012&amp;#039;,                &amp;#039;en&amp;#039;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function suite:test_SDC_description()&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Description|mid=M4184419  |lang=en|icon=0}}&amp;#039;, &amp;#039;{{en|1=A five year old hanging around bouldering wall in Sportrock climbing gym in Alexandria, Virginia, USA}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Description|mid=M13811643 |lang=en|icon=0}}&amp;#039;, &amp;#039;{{en|1=Footbridge near Mill House}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Description|mid=M3050001  |lang=pl|icon=0}}&amp;#039;, &amp;#039;{{Description |text_lang=pl |text=Tablica pamiątkowa - Saperom którzy zginęli koło Jasła|user_lang=pl}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Description|mid=M3050001 |lang=en|icon=0}}&amp;#039;, &amp;#039;{{pl|1=Tablica pamiątkowa - Saperom którzy zginęli koło Jasła}}&amp;#039;)&lt;br /&gt;
end  &lt;br /&gt;
&lt;br /&gt;
function suite:test_SDC_source()&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Source|mid=M21436087 |lang=en|icon=0}}&amp;#039;, &amp;#039;{{Own}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Source|mid=M17273462 |lang=en|icon=0}}&amp;#039;, &amp;#039;{{Own work by original uploader|lang=en}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Source|mid=M13811643 |lang=pl|icon=0}}&amp;#039;, &amp;#039;[https://www.geograph.org.uk/photo/1101914 Geograph Britain and Ireland]&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Source|mid=M92783235 |lang=en|icon=0}}&amp;#039;, &amp;#039;published in&amp;amp;#58; \n* {{#invoke:Cite Wikidata|citeWikidata|item=Q97940059|lang=en}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Source|mid=M92783235 |lang=pl|icon=0}}&amp;#039;, &amp;#039;opublikowano w&amp;amp;#58; \n* {{#invoke:Cite Wikidata|citeWikidata|item=Q97940059|lang=pl}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Source|mid=M3307691  |lang=en|icon=0}}&amp;#039;, &amp;#039;published in&amp;amp;#58; \n* {{#invoke:Cite Wikidata|citeWikidata|item=Q98140374|lang=en|page=164}}\n* {{#invoke:Cite Wikidata|citeWikidata|item=Q98057938|lang=en|page=63}}&amp;#039;, {nowiki=1})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function suite:test_SDC_location()&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Location|mid=M13422936 |lang=en|icon=0}}&amp;#039;, &amp;#039;{{Label|Q5523606}}&amp;#039;)&lt;br /&gt;
	self:assertSameResult(&amp;#039;{{#invoke:Information/sandbox|SDC_Location|mid=M13811643 |lang=en|icon=0}}&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return suite&lt;/div&gt;</summary>
		<author><name>Shahroudi</name></author>
	</entry>
</feed>