Merge "More tests for Parsoid's beneift."
authorGWicke <gwicke@wikimedia.org>
Fri, 1 Mar 2013 19:06:03 +0000 (19:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 1 Mar 2013 19:06:04 +0000 (19:06 +0000)
tests/parser/parserTests.txt

index 5f4090e..492edb6 100644 (file)
@@ -2499,6 +2499,17 @@ External links: multiple legal whitespace is fine, Magnus. Don't break it please
 </p>
 !! end
 
+!! test
+External links: link text with spaces
+!! input
+[http://www.example.com a b c]
+[http://www.example.com ''a'' ''b'']
+!! result
+<p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
+<a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
+</p>
+!! end
+
 !! test
 External links: wiki links within external link (Bug 3695)
 !! input
@@ -2659,21 +2670,6 @@ External link containing double-single-quotes with no space separating the url f
 </p>
 !! end
 
-!!test
-Text in square brackets that is not a link should parse as text
-!!input
-[foo]
-[{{echo|foo}}]
-[url={{echo|foo}}]
-[url=http://example.com]
-!!result
-<p>[foo]
-[foo]
-[url=foo]
-[url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
-</p>
-!!end
-
 !! test
 URL-encoding in URL functions (single parameter)
 !! input
@@ -2728,6 +2724,8 @@ Non-extlinks in brackets
 [{{echo|foo}} ''bar'']
 [{{echo|foo}}l's] errand
 [{{echo|foo}}l's errand]
+[url={{echo|foo}}]
+[url=http://example.com]
 !! result
 <p>[foo]
 [foo bar]
@@ -2739,6 +2737,8 @@ Non-extlinks in brackets
 [foo <i>bar</i>]
 [fool's] errand
 [fool's errand]
+[url=foo]
+[url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
 </p>
 !! end
 
@@ -5840,7 +5840,7 @@ Templates: HTML Tables: 4f. Generating a single tag of a HTML table
 !!end
 
 !!test
-Templates: Wiki Tables: 1. Fostering of entire template content
+Templates: Wiki Tables: 1a. Fostering of entire template content
 !!input
 {|
 {{echo|a}}
@@ -5852,6 +5852,24 @@ a
 
 !!end
 
+!!test
+Templates: Wiki Tables: 1b. Fostering of entire template content
+!!input
+{|
+{{echo|<div>}}
+foo
+{{echo|</div>}}
+|}
+!!result
+<table>
+<div>
+<p>foo
+</p>
+</div>
+<tr><td></td></tr></table>
+
+!!end
+
 !!test
 Templates: Wiki Tables: 2. Fostering of partial template content
 !!input
@@ -5893,7 +5911,7 @@ Templates: Wiki Tables: 4. Templated tags, no content
 !!end
 
 !!test
-Templates: Wiki Tables: 4. Templated tags, regular td-tags
+Templates: Wiki Tables: 5. Templated tags, regular td-tags
 !!input
 {{tbl-start}}
 |foo
@@ -5907,7 +5925,7 @@ Templates: Wiki Tables: 4. Templated tags, regular td-tags
 !!end
 
 !!test
-Templates: Wiki Tables: 4. Templated tags, templated td-tags
+Templates: Wiki Tables: 6. Templated tags, templated td-tags
 !!input
 {{tbl-start}}
 {{!}}foo