From 6ec3845da6662693e53edb5b1a8e13e67ae0dd3b Mon Sep 17 00:00:00 2001 From: Platonides Date: Mon, 30 May 2011 22:25:15 +0000 Subject: [PATCH] Revert r89013 and add better tests. --- tests/parser/parserTests.txt | 135 +++++++++++++++++++---------------- 1 file changed, 74 insertions(+), 61 deletions(-) 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 -
  • ac -
  • d<b>e -
-

-

-
  • fg -
  • h<b>i -
-

one -

-
  • a<b>c -
  • d<b>e -
-

-

-
  • -
  • -
-

two -nop<b>q -

-!! end TODO: more images -- 2.20.1