0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-19 10:45:18 +00:00

Make --disable-phpt and --only-phpt flags work with multitest.php

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1558 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2008-02-17 01:12:30 +00:00
parent 51da183f80
commit f4c4354ae4

View File

@ -38,16 +38,14 @@ $AC['file'] = '';
$AC['xml'] = false;
$AC['quiet'] = false;
$AC['php'] = 'php';
$AC['disable-phpt'] = false;
$AC['only-phpt'] = false;
$aliases = array(
'f' => 'file',
'q' => 'quiet',
);
htmlpurifier_parse_args($AC, $aliases);
// Currently not configurable
$AC['disable-phpt'] = false;
$AC['only-phpt'] = false;
// Calls generate-includes.php automatically
shell_exec($AC['php'] . ' ../maintenance/merge-library.php');
@ -78,31 +76,32 @@ foreach ($versions_to_test as $version) {
$version = $version[0];
$flush = '--flush';
}
if (!$AC['exclude-normal']) {
$test->addTestCase(
new CliTestCase(
"$phpv $version index.php --xml $flush --disable-phpt $file",
$AC['quiet'], $size
)
);
if (!$AC['only-phpt']) {
if (!$AC['exclude-normal']) {
$test->addTestCase(
new CliTestCase(
"$phpv $version index.php --xml $flush --disable-phpt $file",
$AC['quiet'], $size
)
);
}
if (!$AC['exclude-standalone']) {
$test->addTestCase(
new CliTestCase(
"$phpv $version index.php --xml $flush --standalone --disable-phpt $file",
$AC['quiet'], $size
)
);
}
}
if (!$AC['exclude-standalone']) {
$test->addTestCase(
new CliTestCase(
"$phpv $version index.php --xml $flush --standalone --disable-phpt $file",
$AC['quiet'], $size
)
);
}
// naming is inconsistent:
//if (!$AC['disable-phpt']) {
if (!$AC['disable-phpt']) { // naming is not consistent
$test->addTestCase(
new CliTestCase(
$AC['php'] . " index.php --xml --php \"$phpv $version\" --only-phpt",
$AC['quiet'], $size
)
);
//}
}
}
// This is the HTML Purifier website's test XML file. We could