From 5e57735622fdb4ae4bb3e94ba8a7f4cf2990b2fb Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 29 Jul 2009 01:10:09 +0000 Subject: [PATCH] * (bug 19957) All known-failing tests now marked disabled; added --run-disabled option to parser test suite to run disabled tests if desired. Based on Dan Nessett's patch set. I put back one of the test cases which does, in fact, work at least on my config. :) --- CREDITS | 1 + RELEASE-NOTES | 2 ++ maintenance/parserTests.inc | 8 +++++--- maintenance/parserTests.php | 1 + maintenance/parserTests.txt | 26 ++++++++++++++++++++++++++ 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/CREDITS b/CREDITS index c645a2b557..df88b0bfc9 100644 --- a/CREDITS +++ b/CREDITS @@ -65,6 +65,7 @@ following names for their contribution to the product. * Carlin * Chris Wrinn * church of emacs +* Dan Nessett * Daniel Arnold * Danny B. * Derk-Jan Hartman diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b0fd39d530..8ba8d007a1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -346,6 +346,8 @@ this. Was used when mwEmbed was going to be an extension. * (bug 17988) Spaces before [[Category:]] links are no longer ignored * (bug 19392) Favicon, apple-touch-icon links matching the defaults are no longer sent +* (bug 19957) All known-failing tests now marked disabled; added --run-disabled + option to parser test suite to run disabled tests if desired. == API changes in 1.16 == diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index a5b7ed5ca1..d76a575634 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -25,7 +25,7 @@ */ /** */ -$options = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record' ); +$options = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record'. 'run-disabled' ); $optionsWithArgs = array( 'regex', 'seed', 'setversion' ); require_once( 'commandLine.inc' ); @@ -125,6 +125,8 @@ class ParserTest { $this->fuzzSeed = intval( $options['seed'] ) - 1; } + $this->runDisabled = isset( $options['run-disabled'] ); + $this->hooks = array(); $this->functionHooks = array(); } @@ -356,8 +358,8 @@ class ParserTest { if (!isset( $data['config'] ) ) $data['config'] = ''; - if (preg_match('/\\bdisabled\\b/i', $data['options']) - || !preg_match("/{$this->regex}/i", $data['test'])) { + if ( (preg_match('/\\bdisabled\\b/i', $data['options']) + || !preg_match("/{$this->regex}/i", $data['test'])) && !$this->runDisabled ) { # disabled test $data = array(); $section = null; diff --git a/maintenance/parserTests.php b/maintenance/parserTests.php index c7e22602fa..41f5d73f88 100644 --- a/maintenance/parserTests.php +++ b/maintenance/parserTests.php @@ -46,6 +46,7 @@ Options: --fuzz Do a fuzz test instead of a normal test --seed Start the fuzz test from the specified seed --help Show this help message + --run-disabled run disabled tests ENDS; diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 824eb74aad..067dbe6066 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -1271,6 +1271,8 @@ Invalid attributes in table cell (bug 1830) # specified here is now valid XML, which is an improvement . . . !! test Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html) +!! options +disabled !! input {| | |[ftp://|x||]" onmouseover="alert(document.cookie)">test @@ -1471,6 +1473,8 @@ Link containing "<#" and ">#" as hex sequences !! test Link containing double-single-quotes '' (bug 4598) +!! options +disabled !! input [[Lista d''e paise d''o munno]] !! result @@ -4787,6 +4791,8 @@ HTML bullet list, closed tags (bug 5497) !! test HTML bullet list, unclosed tags (bug 5497) +!! options +disabled !! input