Don't look for pipes in the root node.
authorPlatonides <platonides@users.mediawiki.org>
Sat, 22 Jan 2011 16:34:14 +0000 (16:34 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sat, 22 Jan 2011 16:34:14 +0000 (16:34 +0000)
tests/parser/preprocess/Fundraising.expected [new file with mode: 0644]
tests/parser/preprocess/Fundraising.txt [new file with mode: 0644]
tests/phpunit/includes/parser/PreprocessorTest.php

diff --git a/tests/parser/preprocess/Fundraising.expected b/tests/parser/preprocess/Fundraising.expected
new file mode 100644 (file)
index 0000000..f5b32cc
--- /dev/null
@@ -0,0 +1,18 @@
+<root>&lt;div name=&quot;fundraising&quot; id=&quot;fundraising&quot; class=&quot;plainlinks&quot; style=&quot;margin-top:5px; text-align: center; background-color: #ffffe0; border: solid 1px #e0e0c0&quot;&gt;
+'''Pwede kang [[Wikimedia:give the gift of knowledge|maghandog ng kaalaman]] sa paraan ng [[Wikimedia:Fundraising#Donation_methods|pagbibigay ng donasyon sa Pundasyong Wikimedia!]]'''
+&lt;br /&gt;
+&lt;fundraising/&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
+&lt;fundraisinglogo/&gt;
+&lt;br /&gt;
+&lt;b&gt;Ngayon, ang iyong [[Wikimedia:Fundraising|kontribusyon]] ay [[Wikimedia:Fundraising FAQ|itatambal]] ng isang anonimong kaibigan.&lt;/b&gt;
+&lt;br /&gt;
+&lt;small&gt;
+[[Wikimedia:Deductibility of donations|Pagbabawas sa mga buwis ng donasyon]]
+|
+[[Wikimedia:Fundraising FAQ|FAQ]]
+|
+[http://upload.wikimedia.org/wikipedia/foundation/2/28/Wikimedia_2006_fs.pdf Mga pampananalaping pahayag]
+&lt;/small&gt;
+&lt;/div&gt;
+</root>
\ No newline at end of file
diff --git a/tests/parser/preprocess/Fundraising.txt b/tests/parser/preprocess/Fundraising.txt
new file mode 100644 (file)
index 0000000..b868b4d
--- /dev/null
@@ -0,0 +1,17 @@
+<div name="fundraising" id="fundraising" class="plainlinks" style="margin-top:5px; text-align: center; background-color: #ffffe0; border: solid 1px #e0e0c0">
+'''Pwede kang [[Wikimedia:give the gift of knowledge|maghandog ng kaalaman]] sa paraan ng [[Wikimedia:Fundraising#Donation_methods|pagbibigay ng donasyon sa Pundasyong Wikimedia!]]'''
+<br />
+<fundraising/>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<fundraisinglogo/>
+<br />
+<b>Ngayon, ang iyong [[Wikimedia:Fundraising|kontribusyon]] ay [[Wikimedia:Fundraising FAQ|itatambal]] ng isang anonimong kaibigan.</b>
+<br />
+<small>
+[[Wikimedia:Deductibility of donations|Pagbabawas sa mga buwis ng donasyon]]
+|
+[[Wikimedia:Fundraising FAQ|FAQ]]
+|
+[http://upload.wikimedia.org/wikipedia/foundation/2/28/Wikimedia_2006_fs.pdf Mga pampananalaping pahayag]
+</small>
+</div>
index 790df5d..c5f5eb6 100644 (file)
@@ -82,6 +82,7 @@ class PreprocessorTest extends MediaWikiTestCase {
                        array( "{{#if: {{{1|}}} | 1 | {{#if: {{{1|}}} | 2 | 3 }} }}", "<root><template><title>#if: <tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg> </title><part><name index=\"1\" /><value> 1 </value></part><part><name index=\"2\" /><value> <template><title>#if: <tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg> </title><part><name index=\"1\" /><value> 2 </value></part><part><name index=\"2\" /><value> 3 </value></part></template> </value></part></template></root>"),
                        array( "{{ {{Foo}}", "<root>{{ <template><title>Foo</title></template></root>"),
                        array( "{{Foobar {{Foo}} {{Bar}} {{Baz}} ", "<root>{{Foobar <template><title>Foo</title></template> <template><title>Bar</title></template> <template><title>Baz</title></template> </root>"),
+                       array( "[[Foo]] |", "<root>[[Foo]] |</root>"),
                        /* array( file_get_contents( dirname( __FILE__ ) . '/QuoteQuran.txt' ), file_get_contents( dirname( __FILE__ ) . '/QuoteQuranExpanded.txt' ) ), */
                );
        }
@@ -101,6 +102,7 @@ class PreprocessorTest extends MediaWikiTestCase {
                        array( "QuoteQuran" ), # http://en.wikipedia.org/w/index.php?title=Template:QuoteQuran/sandbox&oldid=237348988 GFDL + CC-BY-SA by Striver
                        array( "Factorial" ), # http://en.wikipedia.org/w/index.php?title=Template:Factorial&oldid=98548758 GFDL + CC-BY-SA by Polonium
                        array( "All_system_messages" ), # http://tl.wiktionary.org/w/index.php?title=Suleras:All_system_messages&oldid=2765 GPL text generated by MediaWiki
+                       array( "Fundraising" ), # http://tl.wiktionary.org/w/index.php?title=MediaWiki:Sitenotice&oldid=5716 GFDL + CC-BY-SA, copied there by Sky Harbor.
                );
        }