Merge "Some additional test cases for Parsoid."
[lhc/web/wiklou.git] / tests / parser / parserTests.txt
index c5151ca..0716d79 100644 (file)
@@ -2657,6 +2657,21 @@ 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
@@ -4620,7 +4635,7 @@ Magic Word: {{SERVER}}
 !! input
 {{SERVER}}
 !! result
-<p><a rel="nofollow" class="external free" href="http://Britney-Spears">http://Britney-Spears</a>
+<p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
 </p>
 !! end
 
@@ -4629,7 +4644,7 @@ Magic Word: {{SERVERNAME}}
 !! input
 {{SERVERNAME}}
 !! result
-<p>Britney-Spears
+<p>example.org
 </p>
 !! end
 
@@ -7059,6 +7074,15 @@ Image caption containing a newline
 </p>
 !!end
 
+!!test
+Parsoid: Image caption containing leading space
+(The leading space should not trigger nowiki escaping in wt2wt mode)
+!! input
+[[Image:Foobar.jpg|thumb| bar]]
+!! result
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>bar</div></div></div>
+
+!!end
 
 !! test
 Bug 3090: External links other than http: in image captions
@@ -8787,9 +8811,9 @@ Sanitizer: Validating that <meta> and <link> work, but only for Microdata
        &lt;meta http-equiv="refresh" content="5"&gt;
        <meta itemprop="hello" content="5" />
 </p>
-       <link itemprop="hello" href="http&#58;//Britney-Spears" />
-       &lt;link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://Britney-Spears">http://Britney-Spears</a>"&gt;
-       <link itemprop="hello" href="http&#58;//Britney-Spears" />
+       <link itemprop="hello" href="http&#58;//example.org" />
+       &lt;link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>"&gt;
+       <link itemprop="hello" href="http&#58;//example.org" />
 </div>
 
 !! end
@@ -12613,6 +12637,19 @@ Strip marker in formatNum
 </p>
 !! end
 
+!! test
+Check noCommafy in formatNum
+!! options
+language=be-tarask
+!! input
+{{formatnum:123456.78}}
+{{formatnum:123456.78|NOSEP}}
+!! result
+<p>123 456,78
+123456.78
+</p>
+!! end
+
 !! test
 Strip marker in grammar
 !! options