Last modified: 2013-08-15 21:27:46 UTC
Currently all parserTests are run with $wgUseTidy=false, but the PHP parser's behavior changes when $wgUseTidy=true (see bug 52760 and bug 17663). Parsoid attempts to maintain equivalence with the $wgUseTidy=true behavior of the parser. We should add a wgUseTidy option to the parserTests. When running parserTests in the PHP parser without tidy installed, tests with wgUseTidy=true would be skipped. When running parserTests in Parsoid, tests with wgUseTidy=false would be skipped. This would allow us to document places where parser output changes with and without tidy, and verify that parsoid remains consistent with the wgUseTidy=true output of the PHP parser.
Tidy has been part of the production pipeline since 2004, so current content has been written against MediaWiki with tidy enabled. Parsoid strives to preserve the semantics of existing content, which is why we are shooting for MediaWiki + tidy. Adding tidy support to parserTests would indeed be useful, and would allow us to share some tests that are currently marked as parsoid-only with the PHP parser.