From c353a0ec715ef38d9e1e11608e12cc2c708a3c98 Mon Sep 17 00:00:00 2001 From: Subramanya Sastry Date: Tue, 4 Dec 2012 10:57:15 -0600 Subject: [PATCH] Added a few tests to spec HTML-pre behavior and test Parsoid. * Renamed existing pre tests to use Indent-Pre to distinguish them from the HTML-pre tests. Change-Id: I3500c3ba7db19b19baa1d9ab4e3bfb5ccbc491d2 --- tests/parser/parserTests.txt | 102 ++++++++++++++++++++++++++++++----- 1 file changed, 88 insertions(+), 14 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index bc24236223..41deec0228 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -542,7 +542,7 @@ nowiki 3 ### Comments ### !! test -Comments and Pre +Comments and Indent-Pre !! input asdf @@ -948,7 +948,7 @@ Bug 6200: Preformatted in
!! end !!test -Templates: Pre: 1a. Templates that break a line should suppress
+Templates: Indent-Pre: 1a. Templates that break a line should suppress 
 !!input
  {{echo|}}
 !!result
@@ -956,7 +956,7 @@ Templates: Pre: 1a. Templates that break a line should suppress 
 !!end
 
 !!test
-Templates: Pre: 1b. Templates that break a line should suppress 
+Templates: Indent-Pre: 1b. Templates that break a line should suppress 
 !!input
  {{echo|
 foo}}
@@ -966,7 +966,7 @@ foo}}
 !!end
 
 !! test
-Templates: Pre: 1c: Wrapping should be based on expanded content
+Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
 !! input
  {{echo|a
 b}}
@@ -978,7 +978,7 @@ b}}
 !!end
 
 !! test
-Templates: Pre: 1d: Wrapping should be based on expanded content
+Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
 !! input
  {{echo|a
 b
@@ -999,7 +999,7 @@ c
 !!end
 
 !!test
-Templates: Pre: 1e. Wrapping should be based on expanded content
+Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
 !!input
 {{echo| foo}}
 
@@ -1030,7 +1030,7 @@ bar
 !!end
 
 !! test
-Templates: Pre: 1f: Wrapping should be based on expanded content
+Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
 !! input
 {{echo| }}a
 
@@ -1120,7 +1120,7 @@ Templates: Strip whitespace from named parameters, but not positional ones
 ###
 
 !!test
-1a. Pre and Comments
+1a. Indent-Pre and Comments
 !!input
  a
 
@@ -1133,7 +1133,7 @@ c
 !!end
 
 !!test
-1b. Pre and Comments
+1b. Indent-Pre and Comments
 !!input
  a
  
@@ -1146,7 +1146,7 @@ c
 !!end
 
 !!test
-1c. Pre and Comments
+1c. Indent-Pre and Comments
 !!input
   a
 
@@ -1159,7 +1159,7 @@ c
 !!end
 
 !!test
-2a. Pre and tables
+2a. Indent-Pre and tables
 !!input
  {|
  |-
@@ -1180,7 +1180,7 @@ c
 !!end
 
 !!test
-2b. Pre and tables
+2b. Indent-Pre and tables
 !!input
   {|
  |-
@@ -1196,7 +1196,7 @@ c
 !!end
 
 !!test
-3a. Pre and block tags (single-line html)
+3a. Indent-Pre and block tags (single-line html)
 !!input
  

foo

foo
@@ -1209,7 +1209,7 @@ c !!end !!test -3b. Pre and block tags (pre-content on separate line) +3b. Indent-Pre and block tags (pre-content on separate line) !!input

foo @@ -1279,6 +1279,80 @@ c !!end +### +### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric) +### + +!!test +HTML-pre: 1. embedded newlines +!!input +

foo
+ +
+foo
+
+ +
+
+foo
+
+ +
+
+
+foo
+
+!!result +
foo
+
+foo
+
+
+
+foo
+
+
+
+
+foo
+
+ +!!end + +!!test +HTML-pre: 2: indented text +!!input +
+ foo
+
+!!result +
+ foo
+
+ +!!end + +!!test +HTML-pre: 3: other wikitext +!!input +
+* foo
+# bar
+= no-h =
+'' no-italic ''
+[[ NoLink ]]
+
+!!result +
+* foo
+# bar
+= no-h =
+'' no-italic ''
+[[ NoLink ]]
+
+ +!!end + ### ### Definition lists ### -- 2.20.1