Added wikitext parsertests for dashes
authorSubramanya Sastry <ssastry@wikimedia.org>
Tue, 3 Jul 2012 16:16:53 +0000 (11:16 -0500)
committerAntoine Musso <hashar@free.fr>
Wed, 4 Jul 2012 09:58:16 +0000 (11:58 +0200)
Change-Id: I0f595f05057068e6459062fc8e8f9fad23021dec

tests/parser/parserTests.txt

index f0ec2e5..6d324e4 100644 (file)
@@ -2716,20 +2716,58 @@ Failing to transform badly formed HTML into correct XHTML
 </p>
 !!end
 
-!! test 
+!! test
 Horizontal ruler (should it add that extra space?)
-!! input 
+!! input
 <hr>
 <hr >
 foo <hr
 > bar
-!! result 
+!! result
 <hr />
 <hr />
 foo <hr /> bar
 
 !! end
 
+!! test
+Horizontal ruler -- 4+ dashes render hr
+!! input
+----
+!! result
+<hr />
+
+!! end
+
+!! test
+Horizontal ruler -- eats additional dashes on the same line
+!! input
+---------
+!! result
+<hr />
+
+!! end
+
+!! test
+Horizontal ruler -- does not collaps dashes on consecutive lines
+!! input
+----
+----
+!! result
+<hr />
+<hr />
+
+!! end
+
+!! test
+Horizontal ruler -- <4 dashes render as plain text
+!! input
+---
+!! result
+<p>---
+</p>
+!! end
+
 ###
 ### Block-level elements
 ###