Rather than overload the 'disabled' option, explicitly mark Parsoid-only
parser tests with "parsoid" in the options field. These are disabled
by default when the PHP parser tests are run (but you could explicitly
enable them with --run-parsoid if you wished, in the same way that you
can enable other disabled tests with --run-disabled).
Document the 'php' option, which the PHP parser tests will ignore, but
will (in the future) be used to mark php-only tests which should be
ignored by the Parsoid parser.
Tweaked 'disabled' option to 'parsoid' for those tests which explicitly
call themselves parsoid-only. I was conservative in this patch; if
the title of the test didn't explicitly mention Parsoid, I left the
test disabled rather than switch it to parsoid.
Change-Id: Id6c396f7966fcb21c1e54e222ab0c9f4e3a34dcc
}
$this->runDisabled = isset( $options['run-disabled'] );
}
$this->runDisabled = isset( $options['run-disabled'] );
+ $this->runParsoid = isset( $options['run-parsoid'] );
$this->hooks = array();
$this->functionHooks = array();
$this->hooks = array();
$this->functionHooks = array();
# language=XXX set content language to XXX for this test
# variant=XXX set the variant of language for this test (eg zh-tw)
# disabled do not run test
# language=XXX set content language to XXX for this test
# variant=XXX set the variant of language for this test (eg zh-tw)
# disabled do not run test
+# parsoid parsoid-only test (not run by PHP parser)
+# php php-only test (not run by the parsoid parser)
# showtitle make the first line the title
# comment run through Linker::formatComment() instead of main parser
# local format section links in edit comment text as local links
# showtitle make the first line the title
# comment run through Linker::formatComment() instead of main parser
# local format section links in edit comment text as local links
!! test
Definition Lists: Nesting: Multi-level (Parsoid only)
!! options
!! test
Definition Lists: Nesting: Multi-level (Parsoid only)
!! options
!! input
;t1 :d1
;;t2 ::d2
!! input
;t1 :d1
;;t2 ::d2
!! test
Definition Lists: Nesting: Test 2 (Parsoid only)
!! options
!! test
Definition Lists: Nesting: Test 2 (Parsoid only)
!! options
!! test
Definition Lists: Nesting: Test 3 (Parsoid only)
!! options
!! test
Definition Lists: Nesting: Test 3 (Parsoid only)
!! options
List embedded in a non-block tag
(Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
!! options
List embedded in a non-block tag
(Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
!! options
Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
(Parsoid-centric)
!! options
Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
(Parsoid-centric)
!! options
!!input
{|
|{{echo|foo</table>}}
!!input
{|
|{{echo|foo</table>}}
Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
(Parsoid-centric)
!! options
Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
(Parsoid-centric)
!! options
!! test
Parsoid-only: HTML tag with broken attribute value quoting
!! options
!! test
Parsoid-only: HTML tag with broken attribute value quoting
!! options
!! input
<span title="Hello world>Foo</span>
!! result
!! input
<span title="Hello world>Foo</span>
!! result
!! test
Parsoid-only: Table with broken attribute value quoting on consecutive lines
!! options
!! test
Parsoid-only: Table with broken attribute value quoting on consecutive lines
!! options
!! input
{|
| title="Hello world|Foo
!! input
{|
| title="Hello world|Foo
-$otions = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled' );
+$otions = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled', 'run-parsoid' );
$optionsWithArgs = array( 'regex', 'filter', 'seed', 'setversion' );
require_once( __DIR__ . '/../maintenance/commandLine.inc' );
$optionsWithArgs = array( 'regex', 'filter', 'seed', 'setversion' );
require_once( __DIR__ . '/../maintenance/commandLine.inc' );
--seed <n> Start the fuzz test from the specified seed
--help Show this help message
--run-disabled run disabled tests
--seed <n> Start the fuzz test from the specified seed
--help Show this help message
--run-disabled run disabled tests
+ --run-parsoid run parsoid tests (normally disabled)
public $keepUploads = false;
public $runDisabled = false;
public $keepUploads = false;
public $runDisabled = false;
+ public $runParsoid = false;
public $regex = '';
public $showProgress = true;
public $savedInitialGlobals = array();
public $regex = '';
public $showProgress = true;
public $savedInitialGlobals = array();
}
if ( ( ( preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] ) && !$this->parserTest->runDisabled )
}
if ( ( ( preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] ) && !$this->parserTest->runDisabled )
+ || ( preg_match( '/\\bparsoid\\b/i', $this->sectionData['options'] ) && !$this->parserTest->runParsoid )
|| !preg_match( "/" . $this->parserTest->regex . "/i", $this->sectionData['test'] ) )
) {
# disabled test
|| !preg_match( "/" . $this->parserTest->regex . "/i", $this->sectionData['test'] ) )
) {
# disabled test