r89013 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89012‎ | r89013 | r89014 >
Date:02:09, 28 May 2011
Author:mah
Status:reverted (Comments)
Tags:
Comment:
follow up r88997 with a rough attempt at a parser test, though, really, we can't test signature expansion
Modified paths:
  • /trunk/phase3/tests/parser/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/parser/parserTests.txt
@@ -9108,7 +9108,68 @@
91099109 </p>
91109110 !! end
91119111
 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
91129121
 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+
91139174 TODO:
91149175 more images
91159176 more tables

Follow-up revisions

RevisionCommit summaryAuthorDate
r89191Revert r89013 and add better tests.platonides22:25, 30 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88997fix for Bug #93 “tilde signatures inside nowiki tags sometimes get expanded...mah20:55, 27 May 2011

Comments

#Comment by MZMcBride (talk | contribs)   02:20, 28 May 2011

Why can't signature expansion be tested?

#Comment by 😂 (talk | contribs)   02:33, 28 May 2011

Because parser tests require static output, and ~~~~ would change every time the tests were run. Pretty sure we could do it with phpunit though.

#Comment by MZMcBride (talk | contribs)   02:38, 28 May 2011

I would think you could use "~~~" and an established fake user. Or figure out some way to ignore/set the timestamp. I just found "can't" a bit odd in context.

#Comment by 😂 (talk | contribs)   02:51, 28 May 2011

That was brought up on IRC, that we could probably test ~~~. Doing 4 or 5 would have problems like I mentioned :)

Also, testing <nowiki>~~~~</nowiki> should be possible.

#Comment by MarkAHershberger (talk | contribs)   01:58, 29 May 2011

great idea.... patches welcome!

How about "Can't currently test signature expansion in parser tests."

Status & tagging log