Another evil test to join r86004 (didn't produce malformed output in the pre-r85922...
[lhc/web/wiklou.git] / tests / parser / parserTests.txt
index 6e45e0a..706d33b 100644 (file)
@@ -1237,7 +1237,8 @@ A table with nothing but a caption
 |}
 !! result
 <table>
-<caption>caption</caption>
+<caption>caption
+</caption>
 <tr><td></td></tr>
 </table>
 
@@ -1290,7 +1291,8 @@ Multiplication table
 |}
 !! result
 <table border="1" cellpadding="2">
-<caption>Multiplication table</caption>
+<caption>Multiplication table
+</caption>
 <thead>
 <tr>
 <th>&#215;</th>
@@ -1406,6 +1408,75 @@ Invalid attributes in table cell (bug 1830)
 
 !! end
 
+!! test
+Heading inside table (affected by r85922)
+!! input
+{|
+|- valign="top"
+|
+=== Heading ===
+|}
+!! result
+<table>
+<tr valign="top">
+<td>
+<h3><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Heading">edit</a>]</span> <span class="mw-headline" id="Heading"> Heading </span></h3>
+</td>
+</tr>
+</table>
+
+!! end
+
+!! test
+A table with a caption with unclosed italic
+!! input 
+{|
+|+ ''caption
+|  Cell
+|}
+!! result
+<table>
+<caption><i>caption</i>
+</caption>
+<tr>
+<td>Cell</td>
+</tr>
+</table>
+
+!! end
+
+!! test
+A table with unclosed italic in a cell
+!! input 
+{|
+| ''Cell
+|}
+!! result
+<table>
+<tr>
+<td><i>Cell</i></td>
+</tr>
+</table>
+
+!! end
+
+!! test
+A table with unclosed italic in a th
+!! input
+{|
+|-
+! ''Cell
+|| Value
+|}
+!! result
+<table>
+<tr>
+<th><i>Cell</i></th>
+<td>Value</td>
+</tr>
+</table>
+
+!! end
 
 !! test
 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
@@ -1422,7 +1493,27 @@ Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitec
 
 !! end
 
+!! test
+Indented Tables, bug 20078
+!! input
+: {| 
+| 1 || 2
+|- 
+| 3 || 4
+|}
+!! result
+<dl><dd><table>
+<tr>
+<td>1</td>
+<td>2</td>
+</tr>
+<tr>
+<td>3</td>
+<td>4</td>
+</tr>
+</table></dd></dl>
 
+!! end
 ###
 ### Internal links
 ###
@@ -5481,10 +5572,13 @@ Fuzz testing: Parser14-table
 !! input
 ==a==
 {| STYLE=__TOC__
+|foo
 !! result
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline" id="a">a</span></h2>
 <table style="&#95;_TOC&#95;_">
-<tr><td></td></tr>
+<tr>
+<td>foo</td>
+</tr>
 </table>
 
 !! end
@@ -5531,12 +5625,10 @@ Fuzz testing: Parser22
 http://===r:::https://b
 
 {|
+
 !!result
 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
 </p>
-<table>
-<tr><td></td></tr>
-</table>
 
 !! end
 
@@ -5557,6 +5649,7 @@ http://===r:::https://b
 # </td>
 # </tr>
 # </table>
+# Known to produce bad XML for now
 !! test
 Fuzz testing: Parser24
 !! options
@@ -5572,9 +5665,10 @@ MOVE YOUR MOUSE CURSOR OVER THIS TEXT
 |
 !! result
 <p>{{{|
-<u class="&#124;">}}}} &gt;
-<br style="onmouseover=&#39;alert(document.cookie);&#39;" />
-</p><p>MOVE YOUR MOUSE CURSOR OVER THIS TEXT
+</p><p><u class="&#124;">}}}} &gt;
+</p><p><br style="onmouseover=&#39;alert(document.cookie);&#39;" />
+</p><p><br />
+MOVE YOUR MOUSE CURSOR OVER THIS TEXT
 </p>
 <table>
 <tr>