From 9b375fdfb8760b197fd77ac3f890c6a4f3eeed46 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Fri, 19 Jan 2007 23:02:28 +0000 Subject: [PATCH] [1.4.0] Added convenient single test selector form on test runner - Also fixed includes in test files - Updated TODO with CSS plans git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@659 48356398-32a2-884e-a903-53898d9a118a --- NEWS | 1 + TODO | 2 + tests/HTMLPurifier/AttrDef/BorderTest.php | 1 + tests/HTMLPurifier/AttrDef/CSSLengthTest.php | 1 + tests/HTMLPurifier/AttrDef/ColorTest.php | 1 + tests/HTMLPurifier/AttrDef/CompositeTest.php | 1 + tests/HTMLPurifier/AttrDef/EmailHarness.php | 1 + tests/HTMLPurifier/AttrDef/IntegerTest.php | 1 + tests/HTMLPurifier/AttrDef/MultipleTest.php | 5 ++- tests/HTMLPurifier/AttrDef/NumberTest.php | 1 + tests/HTMLPurifier/AttrDef/PercentageTest.php | 1 + tests/HTMLPurifier/AttrTransform/BdoDirTest.php | 1 + .../HTMLPurifier/AttrTransform/ImgRequiredTest.php | 1 + tests/HTMLPurifier/AttrTransform/TextAlignTest.php | 1 + tests/index.php | 49 ++++++++++++++++++++-- 15 files changed, 63 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index cac5c31c..11b3438e 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier ! Added %Core.EscapeNonASCIICharacters to workaround loss of Unicode characters while %Core.Encoding is set to a non-UTF-8 encoding. . Implemented AttrDef_CSSURI for url(http://google.com) style declarations +. Added convenient single test selector form on test runner 1.3.3, unknown release date, likely to be dropped ! Moved SLOW to docs/enduser-slow.html and added code examples diff --git a/TODO b/TODO index 6a3bc84b..e8b6f1fc 100644 --- a/TODO +++ b/TODO @@ -36,6 +36,8 @@ TODO List - Friendly strict handling of
(block ->
) 2.0 release + # Legit token based CSS parsing (will require revamping almost every + AttrDef class) # Formatters for plaintext (COMPLEX) - Auto-paragraphing (be sure to leverage fact that we know when things shouldn't be paragraphed, such as lists and tables). diff --git a/tests/HTMLPurifier/AttrDef/BorderTest.php b/tests/HTMLPurifier/AttrDef/BorderTest.php index 7a8153d5..b18bfe70 100644 --- a/tests/HTMLPurifier/AttrDef/BorderTest.php +++ b/tests/HTMLPurifier/AttrDef/BorderTest.php @@ -1,6 +1,7 @@ =')) { $test_files[] = 'TokenFactoryTest.php'; } +sort($test_files); +$GLOBALS['HTMLPurifierTest']['Files'] = $test_files; + $test_file_lookup = array_flip($test_files); function htmlpurifier_path2class($path) { @@ -119,12 +124,48 @@ function htmlpurifier_path2class($path) { return $temp; } -// we can't use addTestFile because SimpleTest chokes on E_STRICT warnings +// use a customized reporter with some helpful UI widgets if (isset($_GET['f']) && isset($test_file_lookup[$_GET['f']])) { + $GLOBALS['HTMLPurifierTest']['File'] = $_GET['f']; +} else { + $GLOBALS['HTMLPurifierTest']['File'] = false; +} + +class HTMLPurifier_SimpleTest_Reporter extends HTMLReporter +{ - // execute only one test - $test_file = $_GET['f']; + function paintHeader($test_name) { + parent::paintHeader($test_name); + $test_file = $GLOBALS['HTMLPurifierTest']['File']; +?> +
+ + +
+run($reporter); -- 2.11.4.GIT