From: Subramanya Sastry
Date: Fri, 1 Mar 2013 00:33:01 +0000 (-0600)
Subject: More tests for Parsoid's beneift.
X-Git-Tag: 1.31.0-rc.0~20523^2
X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=f74897584c5e592fd0861e3e8d05c4be7ed2d453;p=lhc%2Fweb%2Fwiklou.git
More tests for Parsoid's beneift.
* One more wikitable fostered content test for this:
https://gerrit.wikimedia.org/r/#/c/51170/
* Merged duplicate extlink test with another.
* Added another extlink text that tests RTing of space-separated
link-text.
Change-Id: I4307bde61b186734f3706dc8940f47e015ec2bc5
---
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 0716d799c1..83eb71bb37 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -2497,6 +2497,17 @@ External links: multiple legal whitespace is fine, Magnus. Don't break it please
!! end
+!! test
+External links: link text with spaces
+!! input
+[http://www.example.com a b c]
+[http://www.example.com ''a'' ''b'']
+!! result
+a b c
+a b
+
+!! end
+
!! test
External links: wiki links within external link (Bug 3695)
!! input
@@ -2657,21 +2668,6 @@ External link containing double-single-quotes with no space separating the url f
!! 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
-[foo]
-[foo]
-[url=foo]
-[url=http://example.com]
-
-!!end
-
!! test
URL-encoding in URL functions (single parameter)
!! input
@@ -2726,6 +2722,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
[foo]
[foo bar]
@@ -2737,6 +2735,8 @@ Non-extlinks in brackets
[foo bar]
[fool's] errand
[fool's errand]
+[url=foo]
+[url=http://example.com]
!! end
@@ -5838,7 +5838,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}}
@@ -5850,6 +5850,24 @@ a
!!end
+!!test
+Templates: Wiki Tables: 1b. Fostering of entire template content
+!!input
+{|
+{{echo|}}
+foo
+{{echo|
}}
+|}
+!!result
+
+
+!!end
+
!!test
Templates: Wiki Tables: 2. Fostering of partial template content
!!input
@@ -5891,7 +5909,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
@@ -5905,7 +5923,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