Sync up with Parsoid parserTests.
authorArlo Breault <abreault@wikimedia.org>
Tue, 14 Jun 2016 17:43:59 +0000 (10:43 -0700)
committerArlo Breault <abreault@wikimedia.org>
Tue, 14 Jun 2016 17:44:20 +0000 (10:44 -0700)
This now aligns with Parsoid commit 969556c9cdc7f03dd02bcf985fc476b22e8053f0

Change-Id: Id124cc5aa32233e7b48578c0ddc4bb88c06fa893

tests/parser/parserTests.txt

index cf7daed..2e059d7 100644 (file)
@@ -7083,11 +7083,12 @@ parsoid=wt2html
 !! end
 
 !! test
-Strip unsupported table tags
+Strip unsupported table tags, but introduce row wikitext as required
 !! options
 parsoid=html2wt
 !! html/parsoid
 <table>
+<caption>Test</caption>
 <thead>
 <tr>
 <th>Month</th>
@@ -7113,10 +7114,12 @@ parsoid=html2wt
 </table>
 !! wikitext
 {|
+|+Test
 
 !Month
 !Savings
 
+|-
 |January
 |$100
 
@@ -7124,10 +7127,31 @@ parsoid=html2wt
 |February
 |$80
 
+|-
 |Sum
 |$180
 
 |}
+!! html/php+tidy
+<table>
+<caption>Test</caption>
+<tr>
+<th>Month</th>
+<th>Savings</th>
+</tr>
+<tr>
+<td>January</td>
+<td>$100</td>
+</tr>
+<tr>
+<td>February</td>
+<td>$80</td>
+</tr>
+<tr>
+<td>Sum</td>
+<td>$180</td>
+</tr>
+</table>
 !! end
 
 !! test
@@ -7243,6 +7267,56 @@ parsoid=html2wt
 </table>
 !! end
 
+!! test
+Serialize wikitext list items as HTML list items when embedded in a HTML list
+!! options
+parsoid=html2wt
+!! html
+<ul data-parsoid='{"stx": "html"}'>
+<li data-parsoid='{}'>a</li>
+<li>b</li>
+</ul>
+!! wikitext
+<ul>
+<li>a</li>
+<li>b</li>
+</ul>
+!! end
+
+# SSS FIXME: Is this actually a good thing given the
+# odd nested list output that is generated by MW?
+# <ul><li>foo<ul>..</ul></li></ul> instead of
+# <ul><li>foo</li><ul>..</ul></ul>
+!! test
+Wikitext lists can be nested inside HTML lists
+!! options
+parsoid=html2wt
+!! html
+<ul data-parsoid='{"stx": "html"}'>
+<li data-parsoid='{"stx": "html"}'>a
+<ul><li>b</li></ul>
+</li>
+</ul>
+
+<ul data-parsoid='{"stx": "html"}'>
+<li>x
+<ul><li>y</li></ul>
+</li>
+</ul>
+!! wikitext
+<ul>
+<li>a
+* b
+</li>
+</ul>
+
+<ul>
+<li>x
+* y
+</li>
+</ul>
+!! end
+
 ###
 ### Internal links
 ###