mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-10 01:06:20 +02:00
Add command line support for loading a single test file.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@750 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@ -51,6 +51,9 @@ $test_file_lookup = array_flip($test_files);
|
|||||||
// determine test file
|
// determine test file
|
||||||
if (isset($_GET['f']) && isset($test_file_lookup[$_GET['f']])) {
|
if (isset($_GET['f']) && isset($test_file_lookup[$_GET['f']])) {
|
||||||
$GLOBALS['HTMLPurifierTest']['File'] = $_GET['f'];
|
$GLOBALS['HTMLPurifierTest']['File'] = $_GET['f'];
|
||||||
|
} elseif (isset($argv[1]) && isset($test_file_lookup[$argv[1]])) {
|
||||||
|
// command-line
|
||||||
|
$GLOBALS['HTMLPurifierTest']['File'] = $argv[1];
|
||||||
} else {
|
} else {
|
||||||
$GLOBALS['HTMLPurifierTest']['File'] = false;
|
$GLOBALS['HTMLPurifierTest']['File'] = false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user