1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 13:47:24 +02:00

Add text parameter to unit tests, forces text output.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2009-02-16 02:59:33 -05:00
parent 77f57aa264
commit 1d70929eba
2 changed files with 5 additions and 1 deletions

View File

@@ -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);