Test handling of templates with invalid template target
authorGabriel Wicke <gwicke@wikimedia.org>
Thu, 29 Nov 2012 17:18:36 +0000 (09:18 -0800)
committerGabriel Wicke <gwicke@wikimedia.org>
Thu, 29 Nov 2012 18:12:14 +0000 (10:12 -0800)
Those templates are not expanded, and their contents are treated regular
wikitext.

Change-Id: I3cbc0c8bed8d44435b83c2523f26db09b27215fa

tests/parser/parserTests.txt

index 31c2ba6..5af8b7a 100644 (file)
@@ -4407,6 +4407,24 @@ Nonexistent template
 </p>
 !! end
 
+!! test
+Template with invalid target containing tags
+!! input
+{{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
+!! result
+<p>{{a<b>b</b>|foo|a=b|a = b}}
+</p>
+!! end
+
+!! test
+Template with invalid target containing unclosed tag
+!! input
+{{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
+!! result
+<p>{{a<b>|foo|a=b|a = b}}</b>
+</p>
+!! end
+
 !! article
 Template:test
 !! text