0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-03-11 17:18:44 +00: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:
Edward Z. Yang 2007-02-15 00:17:23 +00:00
parent 9c031b5c1e
commit c09432e171

View File

@ -51,6 +51,9 @@ $test_file_lookup = array_flip($test_files);
// determine test file
if (isset($_GET['f']) && isset($test_file_lookup[$_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 {
$GLOBALS['HTMLPurifierTest']['File'] = false;
}