From bc97a03f06bfb4bfd33cd2ec2a127c2f607e34e2 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Thu, 3 Oct 2013 10:53:10 -0400 Subject: [PATCH] Sync up with Parsoid parserTests. This now aligns with Parsoid commit 3d6d0723f93e2a838df717b5036e5cd6b0345eca Change-Id: Iadc98cc4cc33c7725e5fbf4a16df7e1a898aee80 --- tests/parser/parserTests.txt | 210 ++++++++++++++++++++++++++++++++++- 1 file changed, 206 insertions(+), 4 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index e21ee3d0cf..3266b166ae 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -17035,6 +17035,29 @@ a b

!! end +#### --------------- Behavior Switches -------------------- +!! test +1. Valid behavior switches should be escaped +!! options +parsoid=html2wt +!! input +__TOC__ +!! result +__TOC__ +!! end + +!! test +2. Invalid behavior switches should not be escaped +!! options +parsoid=html2wt +!! input +__TOO__ +__|__ +!! result +__TOO__ +__|__ +!! end + #### --------------- HTML tags --------------- #### 1. a tags #### 2. other tags @@ -17499,6 +17522,176 @@ parsoid=wt2html
!!end +!!test +Encapsulation properly handles null DSR information from foster box +!!options +parsoid=wt2html,wt2wt +!!input +{{echo|foo
bar
}} +!!result +foo + + + +
bar
+!!end + +!!test +1. Encapsulate foster-parented transclusion content +!!options +parsoid=wt2wt,wt2html +!!input +{{echo|foo}}
bar
+!!result +foo + + + +
bar
+!!end + +!!test +2. Encapsulate foster-parented transclusion content +!!options +parsoid=wt2wt,wt2html +!!input +
{{echo|foo}}
bar
+!!result +
foo
+ + + +
bar
+!!end + +!!test +3. Encapsulate foster-parented transclusion content +!!options +parsoid=wt2wt,wt2html +!!input +

{{echo|foo

}}bar
+!!result +
+

foo

+ + + +
bar
+!!end + +!!test +4. Encapsulate foster-parented transclusion content +!!options +parsoid=wt2wt,wt2html +!!input +

{{echo|foo

}}bar
+!!result +
+

foo

+ + + +
bar
+!!end + +!!test +5. Encapsulate foster-parented transclusion content +!!options +parsoid=wt2wt,wt2html +!!input +foo}}

{{echo|foo

+!!result +foo + + + +
+
+

foo

+!!end + +!!test +6. Encapsulate foster-parented transclusion content +!!options +parsoid=wt2wt,wt2html +!!input +foo

{{echo|foo

}}

ok

+!!result +foo + + + +
+
+

foo

+

ok

+!!end + +!!test +7. Encapsulate foster-parented transclusion content +!!options +parsoid=wt2wt,wt2html +!!input +{{echo|

foo

}}
bar
+!!result +

foo

+ + + +
bar
+!!end + +!!test +8. Encapsulate foster-parented transclusion content +!!options +parsoid=wt2wt,wt2html +!!input +{{echo|a +}}{|{{echo|style='color:red'}} +|- +|b +|} +!!result +

a

{{{1}}} + + + +
b
+!!end + # ----------------------------------------------------------------- # The following section of tests are primarily to spec requirements # around serialization of new/edited content. @@ -17620,7 +17813,7 @@ a #----------------------------- !! test -1. I/B qoute minimization: wikitext-only tags should be combined +1. I/B quote minimization: wikitext-only tags should be combined !! options parsoid=html2wt !! input @@ -17633,16 +17826,25 @@ parsoid=html2wt '''A''B''''' '''A''BC''D''' + +'''''AB''''' + +'''''AB''''' + +'''''AB''''' !! result

AB

AB

AB

AB

ABCD

+

AB

+

AB

+

AB

!! end !! test -2. I/B qoute minimization: wikitext and html tags should not be combined +2. I/B quote minimization: wikitext and html tags should not be combined !! options parsoid=html2wt !! input @@ -17655,7 +17857,7 @@ parsoid=html2wt !! end !! test -3. I/B qoute minimization: templated content stops minimization +3. I/B quote minimization: templated content stops minimization !! options parsoid=html2wt !! input @@ -17668,7 +17870,7 @@ parsoid=html2wt !! end !! test -4. I/B qoute minimization: new content should be mimimized with adjacent old content +4. I/B quote minimization: new content should be mimimized with adjacent old content !! options parsoid=html2wt !! input -- 2.20.1