Test table captions with attributes
authorGabriel Wicke <gwicke@wikimedia.org>
Tue, 15 Jan 2013 23:01:42 +0000 (15:01 -0800)
committerGabriel Wicke <gwicke@wikimedia.org>
Tue, 15 Jan 2013 23:16:48 +0000 (15:16 -0800)
Parsoid did not support these before, but now does. Makes sure this is also
covered by a test.

Change-Id: I7645d390bc14c4f7f115e857266d0015ddbd9de4

tests/parser/parserTests.txt

index c68f7d7..8f297ad 100644 (file)
@@ -2724,6 +2724,45 @@ A table with nothing but a caption
 
 !! end
 
+!! test
+A table with caption with default-spaced attributes and a table row
+!! input
+{|
+|+ style="color: red;" | caption1
+|-
+| foo
+|}
+!! result
+<table>
+<caption style="color: red;"> caption1
+</caption>
+<tr>
+<td> foo
+</td></tr></table>
+
+!! end
+
+!! test
+A table with captions with non-default spaced attributes and a table row
+!! input
+{|
+|+style="color: red;"|caption2
+|+ style="color: red;"| caption3
+|-
+| foo
+|}
+!! result
+<table>
+<caption style="color: red;">caption2
+</caption>
+<caption style="color: red;"> caption3
+</caption>
+<tr>
+<td> foo
+</td></tr></table>
+
+!! end
+
 !! test
 Table td-cell syntax variations
 !! input