Last modified: 2012-10-14 16:50:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19100, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17100 - parserTest output inherits categories from previous parserTests
parserTest output inherits categories from previous parserTests
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-21 00:59 UTC by jopiswezggzmw
Modified: 2012-10-14 16:50 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description jopiswezggzmw 2009-01-21 00:59:40 UTC
Take the following parser test:

!! article
Category:Foo
!! text
Foo
!! endarticle

!! article
Category:Bar
!! text
Bar
!! endarticle

!! test
Category1
!! options
cat
!! input
[[Category:Foo]]
!! result
<a href="/wiki/Category:Foo" title="Category:Foo">Foo</a>
!! end

!! test
Category2
!! options
cat
!! input
[[Category:Bar]]
!! result
<a href="/wiki/Category:Bar" title="Category:Bar">Foo</a>
!! end


Both of theses should pass as each only contains one category, however the result is

Reading tests from "maintenance/parserTests.txt"...
Running test Category1... PASSED
Running test Category2... FAILED!
--- /tmp/mwParser-774531766-expected	2009-01-21 00:48:24.000000000 +0000
+++ /tmp/mwParser-774531766-actual	2009-01-21 00:48:24.000000000 +0000
@@ -1 +1 @@
-<a href="/wiki/Category:Bar" title="Category:Bar">Bar</a>
+<a href="/wiki/Category:Foo" title="Category:Foo">Foo</a> <a href="/wiki/Category:Bar" title="Category:Bar">Bar</a>


The result for the second test is inheriting the category from the first test causing it to fail.


When run individually they work fine;

root@vector:/var/www/phase3# php maintenance/parserTests.php --regex Category1
This is MediaWiki version 1.15alpha (r45920).

Reading tests from "maintenance/parserTests.txt"...
Running test Category1... PASSED

Passed 1 of 1 tests (100%)... ALL TESTS PASSED!
root@vector:/var/www/phase3# php maintenance/parserTests.php --regex Category2
This is MediaWiki version 1.15alpha (r45920).

Reading tests from "maintenance/parserTests.txt"...
Running test Category2... PASSED

Passed 1 of 1 tests (100%)... ALL TESTS PASSED!
Comment 1 Tim Landscheidt 2012-10-14 16:50:36 UTC
This works for me at least with cbed68b994cc587b7e5b8e5b2f93447a9464c8b5.  Your test case itself fails contrary to your description (with '<a href="/wiki/Category:Bar" title="Category:Bar">Foo</a>' being the culprit), but changing "Foo" to "Bar" there lets both tests, whether run alone or together, pass.

If I'm missing something, please reopen this bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links