From c09432e171ef96df838bfa14a9e65d8faf96521c Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 15 Feb 2007 00:17:23 +0000 Subject: [PATCH] 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 --- tests/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/index.php b/tests/index.php index 426c6209..59d86aa8 100644 --- a/tests/index.php +++ b/tests/index.php @@ -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; }