Add a test for named vs. positional parameter whitespace stripping
authorGabriel Wicke <gwicke@wikimedia.org>
Thu, 8 Nov 2012 22:04:08 +0000 (14:04 -0800)
committerGabriel Wicke <gwicke@wikimedia.org>
Thu, 8 Nov 2012 22:04:08 +0000 (14:04 -0800)
Change-Id: Ic673cc224c41aa452bf8d97fc0f1e06fcf2befed

tests/parser/parserTests.txt

index fd4c08b..790723c 100644 (file)
@@ -1042,6 +1042,34 @@ Templates: Pre: 1f: Wrapping should be based on expanded content
 </pre>
 !!end
 
+!! test
+Templates: Strip whitespace from named parameters, but not positional ones
+!! input
+{{echo|
+ foo}}
+
+{{echo|
+* foo}}
+
+{{echo| 1 =
+ foo}}
+
+{{echo| 1 =
+* foo}}
+!! result
+<pre>foo
+</pre>
+<p><br />
+</p>
+<ul><li> foo
+</li></ul>
+<p>foo
+</p>
+<ul><li> foo
+</li></ul>
+
+!! end
+
 ###
 ### Parsoid-centric tests for testing RT edge cases for pre
 ###