From 1d70929eba39d2e2b0c160f2d41439dc52db936f Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Mon, 16 Feb 2009 02:59:33 -0500 Subject: [PATCH] Add text parameter to unit tests, forces text output. Signed-off-by: Edward Z. Yang --- NEWS | 1 + tests/index.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c06f1531..9e72969c 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier Thanks Pierre Attar for reporting. - Fix YouTube rendering problem on certain versions of Firefox. - Fix CSSDefinition Printer problems with decorators +- Add text parameter to unit tests, forces text output . Add verbose mode to command line test runner, use (--verbose) . Turn on unit tests for UnitConverter . Fix missing version number in configuration %Attr.DefaultImageAlt (added 3.2.0) diff --git a/tests/index.php b/tests/index.php index 9556dfe9..0c8c4e1a 100755 --- a/tests/index.php +++ b/tests/index.php @@ -40,6 +40,7 @@ $AC['dry'] = false; $AC['php'] = $php; $AC['help'] = false; $AC['verbose'] = false; +$AC['txt'] = false; $AC['type'] = ''; $AC['disable-phpt'] = false; @@ -62,6 +63,7 @@ Allowed options: --standalone --file (-f) HTMLPurifier/NameOfTest.php --xml + --txt --dry --php /path/to/php --type ( htmlpurifier | configdoc | fstools | htmlt | vtest | phpt ) @@ -100,7 +102,8 @@ require 'HTMLPurifier/Harness.php'; if ($AC['xml']) { if (!SimpleReporter::inCli()) header('Content-Type: text/xml;charset=UTF-8'); $reporter = new XmlReporter(); -} elseif (SimpleReporter::inCli()) { +} elseif (SimpleReporter::inCli() || $AC['txt']) { + if (!SimpleReporter::inCli()) header('Content-Type: text/plain;charset=UTF-8'); $reporter = new HTMLPurifier_SimpleTest_TextReporter($AC); } else { $reporter = new HTMLPurifier_SimpleTest_Reporter('UTF-8', $AC);