From 96f846deae05116c6a4ff6aea89b0d99e60687ad Mon Sep 17 00:00:00 2001 From: Subramanya Sastry Date: Fri, 19 Oct 2012 17:22:18 -0500 Subject: [PATCH] Add additional specs + Parsoid-centric tests to keep Parsoid in line. Change-Id: I9a6970b13d6f76d1f740655b3ff5061b6edad32f --- tests/parser/parserTests.txt | 141 +++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index fa60b4279f..eb3a961214 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -2278,6 +2278,24 @@ Simple table !! end +!! test +Simple table but with multiple dashes for row wikitext +!! input +{| +| foo +|----- +| bar +|} +!! result + + + + +
foo +
bar +
+ +!! end !! test Multiplication table !! input @@ -3315,6 +3333,31 @@ Nested lists 8 (multiple nesting transitions) !! end +!! test +1. Lists with start-of-line-transparent tokens before bullets: Comments +!! input +*foo +*bar +*baz +!! result + + +!! end + +!! test +2. Lists with start-of-line-transparent tokens before bullets: Template close +!! input +*foo {{echo|bar +}}*baz +!! result + + +!! end !! test List items are not parsed correctly following a
 block (bug 785)
@@ -4762,6 +4805,70 @@ a
bc
de !!end +!!test +Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting +(Parsoid-centric) +!! options +disabled +!!input +{| +|{{echo|foo}} +|bar +|} +!!result + +
foo
+bar + +!!end + +!!test +Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting +(Parsoid-centric) +!! options +disabled +!!input + + + + +
+ + +
1. {{echo|foo
}}
bar 2. {{echo|baz
}} + + + abc + + + + + + xyz + + +!!result + + + + +
+ + +
1. foo
bar 2. baz
+ + + abc + + + + + + xyz + + +!!end + !!test Parser Functions: 1. Simple example !!input @@ -5449,6 +5556,29 @@ Image with empty attribute !! end +!! test +Image with link tails +!! input +123[[Image:foobar.jpg]]456 +123[[Image:foobar.jpg|right]]456 +123[[Image:foobar.jpg|thumb]]456 +!! result +

123Foobar.jpg456 +

+123
Foobar.jpg
456 +123
Foobar.jpg
456 + +!! end + +!! test +Image with multiple captions -- only last one is accepted +!! input +[[Image:foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]] +!! result +
Caption3 - accepted
+ +!! end + !! test Image with link parameter, wiki target !! input @@ -5916,6 +6046,17 @@ pst [[Category:Foo (bar)|Foo]] !! end +!! test +Category with link tail +!! options +cat +pst +!! input +123[[Category:Foo]]456 +!! result +123[[Category:Foo]]456 +!! end + !! test Category with template !! options -- 2.20.1