From: Platonides
Date: Mon, 30 May 2011 22:25:15 +0000 (+0000)
Subject: Revert r89013 and add better tests.
X-Git-Tag: 1.31.0-rc.0~29834
X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=6ec3845da6662693e53edb5b1a8e13e67ae0dd3b;p=lhc%2Fweb%2Fwiklou.git
Revert r89013 and add better tests.
---
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index b6fd8c2f27..637fe988be 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -3871,6 +3871,80 @@ pst title=[[Ns:Somearticle (IGNORED), Context]]
[[Ns:Article, Context|Article]]
!! end
+!! test
+pre-save transform: trim trailing empty lines
+!! options
+pst
+!! input
+Empty lines are trimmed
+
+
+
+
+!! result
+Empty lines are trimmed
+!! end
+
+!! test
+pre-save transform: Signature expansion
+!! options
+pst
+!! input
+* ~~~
+* ~~~
+* ~~~
+* ~~~
+!! result
+* [[Special:Contributions/127.0.0.1|127.0.0.1]]
+* [[Special:Contributions/127.0.0.1|127.0.0.1]]
+* [[Special:Contributions/127.0.0.1|127.0.0.1]]
+* [[Special:Contributions/127.0.0.1|127.0.0.1]]
+!! end
+
+
+!! test
+pre-save transform: Signature expansion in nowiki tags (bug 93)
+!! options
+pst
+!! input
+Shall not expand:
+
+~~~~
+
+~~~~
+
+~~~~
+
+~~~~
+
+{{subst:Foo}} shall be converted to FOO
+
+As well as inside noinclude/onlyinclude
+{{subst:Foo}}
+{{subst:Foo}}
+
+But not inside includeonly
+{{subst:Foo}}
+!! result
+Shall not expand:
+
+~~~~
+
+~~~~
+
+~~~~
+
+~~~~
+
+FOO shall be converted to FOO
+
+As well as inside noinclude/onlyinclude
+FOO
+FOO
+
+But not inside includeonly
+{{subst:Foo}}
+!! end
###
### Message transform tests
@@ -9108,67 +9182,6 @@ Special characters in embedded file links (bug 27679)
!! end
-!! article
-Template:Bug93a
-!! text
-*ac
-*de
-
-*fg
-*hi
-!! endarticle
-
-!! article
-Template:Bug93b
-!! text
-*ac
-*de
-
-*jk
-*lm
-!! endarticle
-
-!! article
-Template:Bug93c
-!! text
-*ac
-*de
-
-*no
-*pq
-!! endarticle
-
-!! test
-Signature expansion in nowiki tags. (bug 93)
-!! input
-{{Bug93a}}
-one
-{{Bug93b}}
-two
-{{Bug93c}}
-!! result
-
-
-
-
-one
-
-
-
-
-
-two
-nop<b>q
-
-!! end
TODO:
more images