From f74897584c5e592fd0861e3e8d05c4be7ed2d453 Mon Sep 17 00:00:00 2001 From: Subramanya Sastry Date: Thu, 28 Feb 2013 18:33:01 -0600 Subject: [PATCH] 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 --- tests/parser/parserTests.txt | 54 ++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 18 deletions(-) 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 + +
+

foo +

+
+
+ +!!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 -- 2.20.1