Parser tests for behaviour of subst: and safesubst: after r61710
authorConrad Irwin <conrad@users.mediawiki.org>
Tue, 2 Feb 2010 15:24:08 +0000 (15:24 +0000)
committerConrad Irwin <conrad@users.mediawiki.org>
Tue, 2 Feb 2010 15:24:08 +0000 (15:24 +0000)
maintenance/parserTests.txt

index 61c190e..4800b56 100644 (file)
@@ -2932,6 +2932,46 @@ pst
 Foo
 !! end
 
+!! article
+Template:SubstTest
+!!text
+{{<includeonly>subst:</includeonly>Includes}}
+!! endarticle
+
+!! article
+Template:SafeSubstTest
+!! text
+{{<includeonly>safesubst:</includeonly>Includes}}
+!! endarticle
+
+!! test
+bug 22297: safesubst: works during PST
+!! options
+pst
+!! input
+{{subst:SafeSubstTest}}{{safesubst:SubstTest}}
+!! result
+FoobarFoobar
+!! end
+
+!! test
+bug 22297: safesubst: works during normal parse
+!! input
+{{SafeSubstTest}}
+!! result
+<p>Foobar
+</p>
+!! end
+
+!! test:
+subst: does not work during normal parse
+!! input
+{{SubstTest}}
+!! result
+<p>{{subst:Includes}}
+</p>
+!! end
+
 !! test
 pre-save transform: context links ("pipe trick")
 !! options