Last modified: 2012-10-14 16:50:36 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!
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.