r89191 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89190‎ | r89191 | r89192 >
Date:22:25, 30 May 2011
Author:platonides
Status:resolved (Comments)
Tags:
Comment:
Revert r89013 and add better tests.
Modified paths:
  • /trunk/phase3/tests/parser/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/parser/parserTests.txt
@@ -3871,7 +3871,81 @@
38723872 [[Ns:Article, Context|Article]]
38733873 !! end
38743874
 3875+!! test
 3876+pre-save transform: trim trailing empty lines
 3877+!! options
 3878+pst
 3879+!! input
 3880+Empty lines are trimmed
38753881
 3882+
 3883+
 3884+
 3885+!! result
 3886+Empty lines are trimmed
 3887+!! end
 3888+
 3889+!! test
 3890+pre-save transform: Signature expansion
 3891+!! options
 3892+pst
 3893+!! input
 3894+* ~~~
 3895+* <noinclude>~~~</noinclude>
 3896+* <includeonly>~~~</includeonly>
 3897+* <onlyinclude>~~~</onlyinclude>
 3898+!! result
 3899+* [[Special:Contributions/127.0.0.1|127.0.0.1]]
 3900+* <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
 3901+* <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
 3902+* <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
 3903+!! end
 3904+
 3905+
 3906+!! test
 3907+pre-save transform: Signature expansion in nowiki tags (bug 93)
 3908+!! options
 3909+pst
 3910+!! input
 3911+Shall not expand:
 3912+
 3913+<nowiki>~~~~</nowiki>
 3914+
 3915+<includeonly><nowiki>~~~~</nowiki></includeonly>
 3916+
 3917+<noinclude><nowiki>~~~~</nowiki></noinclude>
 3918+
 3919+<onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
 3920+
 3921+{{subst:Foo}} shall be converted to FOO
 3922+
 3923+As well as inside noinclude/onlyinclude
 3924+<noinclude>{{subst:Foo}}</noinclude>
 3925+<onlyinclude>{{subst:Foo}}</onlyinclude>
 3926+
 3927+But not inside includeonly
 3928+<includeonly>{{subst:Foo}}</includeonly>
 3929+!! result
 3930+Shall not expand:
 3931+
 3932+<nowiki>~~~~</nowiki>
 3933+
 3934+<includeonly><nowiki>~~~~</nowiki></includeonly>
 3935+
 3936+<noinclude><nowiki>~~~~</nowiki></noinclude>
 3937+
 3938+<onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
 3939+
 3940+FOO shall be converted to FOO
 3941+
 3942+As well as inside noinclude/onlyinclude
 3943+<noinclude>FOO</noinclude>
 3944+<onlyinclude>FOO</onlyinclude>
 3945+
 3946+But not inside includeonly
 3947+<includeonly>{{subst:Foo}}</includeonly>
 3948+!! end
 3949+
38763950 ###
38773951 ### Message transform tests
38783952 ###
@@ -9108,68 +9182,7 @@
91099183 </p>
91109184 !! end
91119185
9112 -!! article
9113 -Template:Bug93a
9114 -!! text
9115 -*a<b>c
9116 -*<nowiki>d<b>e</nowiki>
9117 -</b>
9118 -*<includeonly>f<b>g</includeonly>
9119 -*<includeonly><nowiki>h<b>i</nowiki></includeonly>
9120 -!! endarticle
91219186
9122 -!! article
9123 -Template:Bug93b
9124 -!! text
9125 -*a<b>c
9126 -*<nowiki>d<b>e</nowiki>
9127 -</b>
9128 -*<noinclude>j<b>k</noinclude>
9129 -*<noinclude><nowiki>l<b>m</nowiki></noinclude>
9130 -!! endarticle
9131 -
9132 -!! article
9133 -Template:Bug93c
9134 -!! text
9135 -*a<b>c
9136 -*<nowiki>d<b>e</nowiki>
9137 -</b>
9138 -*<onlyinclude>n<b>o</onlyinclude>
9139 -*<onlyinclude><nowiki>p<b>q</nowiki></onlyinclude>
9140 -!! endarticle
9141 -
9142 -!! test
9143 -Signature expansion in nowiki tags. (bug 93)
9144 -!! input
9145 -{{Bug93a}}
9146 -one
9147 -{{Bug93b}}
9148 -two
9149 -{{Bug93c}}
9150 -!! result
9151 -<ul><li>a<b>c
9152 -</li><li>d&lt;b&gt;e
9153 -</li></ul>
9154 -<p></b>
9155 -</p>
9156 -<ul><li>f<b>g
9157 -</li><li>h&lt;b&gt;i
9158 -</li></ul>
9159 -<p>one
9160 -</p>
9161 -<ul><li>a&lt;b&gt;c
9162 -</li><li>d&lt;b&gt;e
9163 -</li></ul>
9164 -<p></b>
9165 -</p>
9166 -<ul><li>
9167 -</li><li>
9168 -</li></ul>
9169 -<p>two
9170 -n<b>op&lt;b&gt;q</b>
9171 -</p>
9172 -!! end
9173 -
91749187 TODO:
91759188 more images
91769189 more tables

Follow-up revisions

RevisionCommit summaryAuthorDate
r89308Revert r88997: fix for bug 93 caused some additional problems....brion00:32, 2 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89013follow up r88997 with a rough attempt at a parser test, though, really, we ca...mah02:09, 28 May 2011

Comments

#Comment by Hashar (talk | contribs)   17:38, 31 May 2011

Breaks test 'pre-save transform: Signature expansion in nowiki tags (bug 93)' for me:

Easily retested using:

$ php tests/parserTests.php --regex 'bug 93'

Diff output:

--- expected	2011-05-31 19:31:42.000000000 +0200
+++ actual	2011-05-31 19:31:42.000000000 +0200
@@ -15,4 +15,4 @@
 FOO
 
 But not inside includeonly
-
+
#Comment by Brion VIBBER (talk | contribs)   00:34, 2 June 2011

Test case currently disabled as the bug 93 stuff it's there to test fails currently. (Fix from r88997 didn't work quite right and was reverted.)

Status & tagging log