<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://animalwiki.yokendo.com/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3AString%2Ftestcases</id>
	<title>モジュール:String/testcases - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://animalwiki.yokendo.com/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3AString%2Ftestcases"/>
	<link rel="alternate" type="text/html" href="https://animalwiki.yokendo.com/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:String/testcases&amp;action=history"/>
	<updated>2026-04-06T14:43:22Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.0-wmf.17</generator>
	<entry>
		<id>https://animalwiki.yokendo.com/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:String/testcases&amp;diff=1293&amp;oldid=prev</id>
		<title>Masashi.oikawa: ページの作成:「-- Unit tests for Module:String. Click talk page to run tests. local p = require(&#039;Module:UnitTests&#039;)   function p:test_len()     self:preprocess_equals_many(&#039;{{#invok…」</title>
		<link rel="alternate" type="text/html" href="https://animalwiki.yokendo.com/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:String/testcases&amp;diff=1293&amp;oldid=prev"/>
		<updated>2021-03-04T02:56:23Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「-- Unit tests for &lt;a href=&quot;/wiki/%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:String&quot; title=&quot;モジュール:String&quot;&gt;Module:String&lt;/a&gt;. Click talk page to run tests. local p = require(&amp;#039;Module:UnitTests&amp;#039;)   function p:test_len()     self:preprocess_equals_many(&amp;#039;{{#invok…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Unit tests for [[Module:String]]. Click talk page to run tests.&lt;br /&gt;
local p = require(&amp;#039;Module:UnitTests&amp;#039;)&lt;br /&gt;
 &lt;br /&gt;
function p:test_len()&lt;br /&gt;
    self:preprocess_equals_many(&amp;#039;{{#invoke:String/sandbox|len|&amp;#039;, &amp;#039;}}&amp;#039;, {&lt;br /&gt;
        {&amp;#039; foo &amp;#039;, &amp;#039;5&amp;#039;},&lt;br /&gt;
        {&amp;#039;s= foo &amp;#039;, &amp;#039;3&amp;#039;},&lt;br /&gt;
        {&amp;#039;&amp;#039;, &amp;#039;0&amp;#039;},&lt;br /&gt;
        {&amp;#039;s=&amp;#039;, &amp;#039;0&amp;#039;},&lt;br /&gt;
        {&amp;#039;   &amp;#039;, &amp;#039;3&amp;#039;},&lt;br /&gt;
        {&amp;#039;最近の更新&amp;#039;, &amp;#039;5&amp;#039;},&lt;br /&gt;
    })&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p:test_replace()&lt;br /&gt;
    self:preprocess_equals_many(&amp;#039;{{#invoke:String/sandbox|replace|&amp;#039;, &amp;#039;}}&amp;#039;, {&lt;br /&gt;
        {&amp;#039;1.1.1.1|.|/&amp;#039;, &amp;#039;1/1/1/1&amp;#039;},&lt;br /&gt;
        {&amp;#039;alpha (beta)| (| gamma (&amp;#039;, &amp;#039;alpha gamma (beta)&amp;#039;},&lt;br /&gt;
        {&amp;#039;Dog (cat)|%s%(.*%)||plain=false&amp;#039;, &amp;#039;Dog&amp;#039;},&lt;br /&gt;
    })&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p:test_match()&lt;br /&gt;
    self:preprocess_equals_many(&amp;#039;{{#invoke:String/sandbox|match|&amp;#039;, &amp;#039;}}&amp;#039;, {&lt;br /&gt;
        {&amp;#039;dog (cat)|%((%a-)%)&amp;#039;, &amp;#039;cat&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat) (canary) (fish)|%((%a-)%)||-1&amp;#039;, &amp;#039;fish&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat) (canary) (fish)|%((%a-)%)||2&amp;#039;, &amp;#039;canary&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat) (canary) (fish)|%((%a-)%)|6|1&amp;#039;, &amp;#039;canary&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat) (canary) (fish)|%((%a-)%)|6|2&amp;#039;, &amp;#039;fish&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat)|%((%a-)%)||2|no_category=true&amp;#039;, &amp;#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;String Module Error: Match not found&amp;lt;/strong&amp;gt;&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat)|%((%a-)%)||2|ignore_errors=true&amp;#039;, &amp;#039;&amp;#039;},&lt;br /&gt;
    })&lt;br /&gt;
end&lt;br /&gt;
function p:test_match()&lt;br /&gt;
    self:preprocess_equals_many(&amp;#039;{{#invoke:String/sandbox|match|&amp;#039;, &amp;#039;}}&amp;#039;, {&lt;br /&gt;
        {&amp;#039;dog (cat)|%((%a-)%)&amp;#039;, &amp;#039;cat&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat) (canary) (fish)|%((%a-)%)||-1&amp;#039;, &amp;#039;fish&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat) (canary) (fish)|%((%a-)%)||2&amp;#039;, &amp;#039;canary&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat) (canary) (fish)|%((%a-)%)|6|1&amp;#039;, &amp;#039;canary&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat) (canary) (fish)|%((%a-)%)|6|2&amp;#039;, &amp;#039;fish&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat)|%((%a-)%)||2|no_category=true&amp;#039;, &amp;#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;String Module Error: Match not found&amp;lt;/strong&amp;gt;&amp;#039;},&lt;br /&gt;
        {&amp;#039;dog (cat)|%((%a-)%)||2|ignore_errors=true&amp;#039;, &amp;#039;&amp;#039;},&lt;br /&gt;
    })&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p:test_find()&lt;br /&gt;
    self:preprocess_equals_many(&amp;#039;{{#invoke:String/sandbox|find|&amp;#039;, &amp;#039;}}&amp;#039;, {&lt;br /&gt;
        {&amp;#039;&amp;#039;, &amp;#039;0&amp;#039;},&lt;br /&gt;
        {&amp;#039;source=&amp;#039;, &amp;#039;0&amp;#039;},&lt;br /&gt;
        {&amp;#039;source=|target=&amp;#039;, &amp;#039;0&amp;#039;},&lt;br /&gt;
        {&amp;#039;source=|target=Bob&amp;#039;, &amp;#039;0&amp;#039;},&lt;br /&gt;
        {&amp;#039;Bob|Joe&amp;#039;, &amp;#039;0&amp;#039;},&lt;br /&gt;
        {&amp;#039;Bob|b&amp;#039;, &amp;#039;3&amp;#039;},&lt;br /&gt;
        {&amp;#039;Bob Joe|oe&amp;#039;, &amp;#039;6&amp;#039;},&lt;br /&gt;
        {&amp;#039;source= Bob |o&amp;#039;, &amp;#039;2&amp;#039;},&lt;br /&gt;
        {&amp;#039; Bob |o&amp;#039;, &amp;#039;3&amp;#039;},&lt;br /&gt;
        {&amp;#039;높지만 급격히|만&amp;#039;, &amp;#039;3&amp;#039;},&lt;br /&gt;
        {&amp;#039;source=BAAAB|target=%w|plain=false&amp;#039;, &amp;#039;1&amp;#039;},&lt;br /&gt;
        {&amp;#039;source=BAAAB|target=%w|start=3|plain=false&amp;#039;, &amp;#039;3&amp;#039;},&lt;br /&gt;
        {&amp;#039;source=BAAAB|target=(%w)%1|plain=false&amp;#039;, &amp;#039;2&amp;#039;},&lt;br /&gt;
    })&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p:test_rep()&lt;br /&gt;
    self:preprocess_equals_many(&amp;#039;{{#invoke:String/sandbox|rep|&amp;#039;, &amp;#039;}}&amp;#039;, {&lt;br /&gt;
        {&amp;#039;abc|1&amp;#039;, &amp;#039;abc&amp;#039;},&lt;br /&gt;
        {&amp;#039;a b|7&amp;#039;, &amp;#039;a ba ba ba ba ba ba b&amp;#039;},&lt;br /&gt;
        {&amp;#039;bla|glug|no_category=true&amp;#039;, &amp;#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;String Module Error: function rep expects a number as second parameter, received &amp;quot;glug&amp;quot;&amp;lt;/strong&amp;gt;&amp;#039;},&lt;br /&gt;
        {&amp;#039;bla|glug|ignore_errors=true&amp;#039;, &amp;#039;&amp;#039;},&lt;br /&gt;
        {&amp;#039;àèò|3&amp;#039;, &amp;#039;àèòàèòàèò&amp;#039;}&lt;br /&gt;
    })&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Masashi.oikawa</name></author>
	</entry>
</feed>